Go to the documentation of this file.
33 #define CMD_CLABELFILE 6
57 "Usage: fis [options] <mat-file>",
59 " Required parameters",
61 " The name of the file storing the transactions. The file is in ",
62 " Cluto's .mat format.",
64 " Optional parameters",
66 " Specifies the minimum length of the patterns. [default: 1]",
69 " Specifies the maximum length of the patterns. [default: none]",
72 " Specifies the minimum frequency of the patterns. [default: 10]",
75 " Specifies the maximum frequency of the patterns. [default: none]",
78 " Does not print the discovered itemsets.",
81 " Specifies the name of the file that stores the column labels.",
84 " Prints this message.",
90 " Usage: fis [options] <mat-file>",
91 " use 'fis -help' for a summary of the options.",
104 int ntrans,
int *tranind);
110 int main(
int argc,
char *argv[])
128 for (
i=0;
i<
mat->ncols;
i++) {
129 sprintf(line,
"%zd",
i);
135 for (
i=0;
i<
mat->ncols;
i++) {
136 if (fgets(line, 8192, fpin) ==
NULL)
150 printf(
"Total itemsets found: %zd\n",
params->nitemsets);
162 printf(
"*******************************************************************************\n");
164 printf(
"Matrix Information ---------------------------------------------------------\n");
165 printf(
" input file=%s, [%d, %d, %zd]\n",
169 printf(
"Options --------------------------------------------------------------------\n");
170 printf(
" minlen=%zd, maxlen=%zd, minfeq=%zd, maxfreq=%zd\n",
174 printf(
"Finding patterns... -----------------------------------------------------\n");
184 printf(
"Memory Usage Information -----------------------------------------------------\n");
187 printf(
"********************************************************************************\n");
243 printf(
"Illegal command-line option(s)\nUse %s -help for a summary of the options.\n", argv[0]);
249 printf(
"Unrecognized parameters.");
258 errexit(
"input file %s does not exist.\n",
params->filename);
278 printf(
"%4zd %4d %4d => ",
params->nitemsets, nitems, ntrans);
279 for (
i=0;
i<nitems;
i++)
280 printf(
" %s",
params->clabels[itemids[
i]]);
282 for (
i=0;
i<ntrans;
i++)
283 printf(
" %d\n", transids[
i]);
char * gk_optarg
For communication arguments to the caller.
void gk_find_frequent_itemsets(int ntrans, ssize_t *tranptr, int *tranind, int minfreq, int maxfreq, int minlen, int maxlen, void(*process_itemset)(void *stateptr, int nitems, int *itemind, int ntrans, int *tranind), void *stateptr)
gk_csr_t * gk_csr_Read(char *filename, int format, int readvals, int numbering)
static struct gk_option long_options[]
int main(int argc, char *argv[])
char * gk_strdup(char *orgstr)
Duplicates a string.
static char shorthelpstr[][100]
void errexit(char *f_str,...)
FILE * gk_fopen(char *, char *, const char *)
static const SmartProjectionParams params
The structure that stores the information about the command-line options.
int gk_optind
Index in ARGV of the next element to be scanned.
void print_init_info(params_t *params, gk_csr_t *mat)
size_t gk_GetMaxMemoryUsed()
params_t * parse_cmdline(int argc, char *argv[])
int gk_fexists(char *fname)
void gk_csr_CreateIndex(gk_csr_t *mat, int what)
char * gk_strtprune(char *, char *)
Prunes characters from the end of the string.
void print_an_itemset(void *stateptr, int nitems, int *itemind, int ntrans, int *tranind)
void print_final_info(params_t *params)
static char helpstr[][100]
int gk_getopt_long_only(int argc, char **argv, char *options, struct gk_option *long_options, int *opt_index)
Parse command-line arguments with only long options.
size_t gk_GetCurMemoryUsed()
void * gk_malloc(size_t nbytes, char *msg)
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:32