资源简介

最大频繁项集挖掘算法fpmax*,也包含闭项集和频繁项集挖掘的代码

资源截图

代码片段和文件信息

/*
   Author:  Jianfei Zhu  
            Concordia University
   Date:    Sep. 26 2003

Copyright (c) 2003 Concordia University Montreal Canada
All rights reserved.

Redistribution and use in source and binary forms with or without
modification are permitted provided that the following conditions are met:

   - Redistributions of source code must retain the above copyright notice
       this list of conditions and the following disclaimer.
   - Redistributions in binary form must reproduce the above copyright
       notice this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
   - Neither the name of Concordia University nor the names of its
       contributors may be used to endorse or promote products derived from
       this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“
AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR
CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

*/

#include 
#include 
#include “buffer.h“
#include “common.h“
#include 

memory::memory()
{
BUFPOS=20;
// BUFS_BIG=5122880L;
// BUFS_SMALL=1024576L;
BUFS_BIG=1024576L;
BUFS_SMALL=4096L;
BUFSBSWITCH=2;
init();
}

memory::memory(int bufpos long bufs_small long bufs_big int bufsbswitch)
{
BUFPOS=bufpos;
BUFS_BIG=bufs_big;
BUFS_SMALL=bufs_small;
BUFSBSWITCH=bufsbswitch;
init();
}

void memory::init()

buffer = new char*[BUFPOS];
start = new char*[BUFPOS];
rest = new unsigned int[BUFPOS];        /* number of free positions */
restsize = new unsigned int[BUFPOS];    /* max. size of buffer */

buffer[0] = new char[BUFS_SMALL];
// buffer[0] = new char[BUFS_BIG];
if (buffer[0] == NULL) {
#ifdef DEBUG
perror(“initbuf 2“); 
#endif
printf(“INIT: not enough memory to run this program\n“);
exit(0);
}
start[0] = buffer[0];
markbuf = buffer[0];
markcount = 0;
// markrest = BUFS_BIG;
// rest[0] = BUFS_BIG;
// restsize[0] = BUFS_BIG;
markrest = BUFS_SMALL;
rest[0] = BUFS_SMALL;
restsize[0] = BUFS_SMALL;
bufcount = 0;
}

memory::~memory()
{
int i;
for(i=0; i <= bufcount; i++)delete []buffer[i];

delete []buffer;
delete []start;
delete []rest;
delete []restsize;
}

char * memory::newbuf(unsigned int numunsigned int size)
// get num times size bytes from the buffer (if possible) 
//  RETURN

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5385  2003-09-27 09:32  fpmax_star\buffer.cpp

     文件       3101  2003-09-27 09:32  fpmax_star\buffer.h

     文件       2464  2003-09-27 09:32  fpmax_star\common.h

     文件       1699  2003-09-27 09:32  fpmax_star\data.cpp

     文件        803  2003-09-27 09:32  fpmax_star\data.h

     文件       5436  2003-09-27 09:32  fpmax_star\fpmax.cpp

     文件       4210  2003-09-27 09:32  fpmax_star\fp_node.cpp

     文件       2646  2003-09-27 09:32  fpmax_star\fp_node.h

     文件      29863  2003-12-06 01:49  fpmax_star\fp_tree.cpp

     文件       4163  2003-12-05 22:34  fpmax_star\fp_tree.h

     文件        674  2003-09-27 09:32  fpmax_star\fsout.cpp

     文件        288  2003-09-27 09:32  fpmax_star\fsout.h

     文件       1191  2003-09-27 09:32  fpmax_star\makefile

     目录          0  2005-06-10 10:39  fpmax_star

----------- ---------  ---------- -----  ----

                61923                    14


评论

共有 条评论