91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 19KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-07
  • 語言: 其他
  • 標簽: PrefixSpan??

資源簡介

序列模式挖掘的PrefixSpan算法源代碼

資源截圖

代碼片段和文件信息

/*
?PrefixSpan:?An?efficient?algorithm?for?sequential?pattern?mining

?$Id:?prefixspan.cppv?1.8?2002/04/03?13:35:23?taku-ku?Exp?$;

?Copyright?(C)?2002?Taku?Kudo??All?rights?reserved.
?This?is?free?software?with?ABSOLUTELY?NO?WARRANTY.

?This?program?is?free?software;?you?can?redistribute?it?and/or?modify
?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?the?Free?Software?Foundation;?either?version?2?of?the?License?or
?(at?your?option)?any?later?version.

?This?program?is?distributed?in?the?hope?that?it?will?be?useful
?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?GNU?General?Public?License?for?more?details.

?You?should?have?received?a?copy?of?the?GNU?General?Public?License
?along?with?this?program;?if?not?write?to?the?Free?Software
?Foundation?Inc.?59?Temple?Place?-?Suite?330?Boston?MA
?02111-1307?USA
*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?

using?namespace?std;

template??class?PrefixSpan?{
private:
??vector??>?????????????transaction;
??vector??>?pattern;
??unsigned?int?minsup;
??unsigned?int?minpat;
??unsigned?int?maxpat;
??bool?all;
??bool?where;
??string?delimiter;??????
??bool?verbose;
??ostream?*os;

??void?report?(vector??>?&projected)?
??{
????if?(minpat?>?pattern.size())?return;

????//?print?where?&?pattern
????if?(where)?{?
??????*os?<“?<
??????//?what:
??????if?(all)?{
*os?<“?<“?< *os?<“;
for?(unsigned?int?i?=?0;?i? ??*os?<??????}?else?{
*os?<“;
?for?(unsigned?int?i?=?0;?i? ???*os?< ???????<??????}

??????*os?<“?<??????
??????//?where
??????*os?<“;
??????for?(unsigned?int?i?=?0;?i? *os?<??????*os?<“?<
??????*os?<“?<
????}?else?{

??????//?print?found?pattern?only
??????if?(all)?{
?*os?< ?for?(unsigned?int?i?=?0;?i? ???*os?<??????}?else?{
?for?(unsigned?int?i?=?0;?i? ???*os?< ???????<??????}
???????
??????*os?<????}
??}

??void?project?(vector??>?&projected)
??{
????if?(all)?report(projected);
????
????map??>?>?counter;
??
????for?(unsigned?int?i?=?0;?i???????int?pos?=?projected[i].second;
??????unsigned?int?id??=?projected[i].first;
??????unsigned?int?size?=?transaction[id].size(

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????????39??2002-04-07?23:24??prefixspan-0.4\AUTHORS

?????文件??????18009??2002-04-07?23:24??prefixspan-0.4\COPYING

?????文件??????51458??2002-04-07?23:24??prefixspan-0.4\data

?????文件????????526??2002-04-07?23:24??prefixspan-0.4\Makefile

?????文件???????6969??2002-04-07?23:24??prefixspan-0.4\prefixspan.cpp

?????文件???????3498??2002-04-07?23:24??prefixspan-0.4\README

?????目錄??????????0??2005-05-15?15:32??prefixspan-0.4

-----------?---------??----------?-----??----

????????????????80499????????????????????7


評論

共有 條評論