Classes | Macros | Functions | Variables
gkgraph.c File Reference

A simple frequent itemset discovery program to test GKlib's routines. More...

#include <GKlib.h>
Include dependency graph for gkgraph.c:

Go to the source code of this file.

Classes

struct  params_t
 

Macros

#define CMD_EPS   2
 
#define CMD_HELP   10
 
#define CMD_LAMDA   3
 
#define CMD_NITER   1
 
#define CMD_TYPE   4
 

Functions

double compute_compactness (params_t *params, gk_graph_t *graph, int32_t *perm)
 
int main (int argc, char *argv[])
 
params_tparse_cmdline (int argc, char *argv[])
 
void print_final_info (params_t *params)
 
void print_init_info (params_t *params, gk_graph_t *graph)
 
void reorder_centroid (params_t *params, gk_graph_t *graph, int32_t *perm)
 

Variables

static char helpstr [][100]
 
static struct gk_option long_options []
 
static char shorthelpstr [][100]
 

Detailed Description

A simple frequent itemset discovery program to test GKlib's routines.


Date
6/12/2008
Author
George
Version
$Id: gkgraph.c 11408 2012-01-25 15:05:58Z karypis $ 

Definition in file gkgraph.c.

Macro Definition Documentation

◆ CMD_EPS

#define CMD_EPS   2

Definition at line 29 of file gkgraph.c.

◆ CMD_HELP

#define CMD_HELP   10

Definition at line 32 of file gkgraph.c.

◆ CMD_LAMDA

#define CMD_LAMDA   3

Definition at line 30 of file gkgraph.c.

◆ CMD_NITER

#define CMD_NITER   1

Constants

Definition at line 28 of file gkgraph.c.

◆ CMD_TYPE

#define CMD_TYPE   4

Definition at line 31 of file gkgraph.c.

Function Documentation

◆ compute_compactness()

double compute_compactness ( params_t params,
gk_graph_t graph,
int32_t perm 
)

Function prototypes

This function computes the compactness of the graph's adjacency list

Definition at line 163 of file gkgraph.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

the entry point

Definition at line 97 of file gkgraph.c.

◆ parse_cmdline()

params_t* parse_cmdline ( int  argc,
char *  argv[] 
)

This is the entry point of the command-line argument parser

Definition at line 288 of file gkgraph.c.

◆ print_final_info()

void print_final_info ( params_t params)

This function prints final statistics

Definition at line 275 of file gkgraph.c.

◆ print_init_info()

void print_init_info ( params_t params,
gk_graph_t graph 
)

This function prints run parameters

Definition at line 254 of file gkgraph.c.

◆ reorder_centroid()

void reorder_centroid ( params_t params,
gk_graph_t graph,
int32_t perm 
)

This function uses a centroid-based approach to refine the ordering

Definition at line 201 of file gkgraph.c.

Variable Documentation

◆ helpstr

char helpstr[][100]
static
Initial value:
= {
" ",
"Usage: gkgraph [options] <graph-file> [<out-file>]",
" ",
" Required parameters",
" graph-file",
" The name of the file storing the graph. The file is in ",
" Metis' graph format.",
" ",
" Optional parameters",
" -niter=int",
" Specifies the maximum number of iterations. [default: 100]",
" ",
" -lamda=float",
" Specifies the follow-the-adjacent-links probability. [default: 0.80]",
" ",
" -eps=float",
" Specifies the error tollerance. [default: 1e-10]",
" ",
" -help",
" Prints this message.",
""
}

Definition at line 51 of file gkgraph.c.

◆ long_options

struct gk_option long_options[]
static
Initial value:
= {
{"type", 1, 0, CMD_TYPE},
{"niter", 1, 0, CMD_NITER},
{"lamda", 1, 0, CMD_LAMDA},
{"eps", 1, 0, CMD_EPS},
{"help", 0, 0, CMD_HELP},
{0, 0, 0, 0}
}

Local variables

Definition at line 38 of file gkgraph.c.

◆ shorthelpstr

char shorthelpstr[][100]
static
Initial value:
= {
" ",
" Usage: gkgraph [options] <graph-file> [<out-file>]",
" use 'gkgraph -help' for a summary of the options.",
""
}

Definition at line 75 of file gkgraph.c.

CMD_TYPE
#define CMD_TYPE
Definition: gkgraph.c:31
CMD_LAMDA
#define CMD_LAMDA
Definition: gkgraph.c:30
CMD_NITER
#define CMD_NITER
Definition: gkgraph.c:28
CMD_HELP
#define CMD_HELP
Definition: gkgraph.c:32
CMD_EPS
#define CMD_EPS
Definition: gkgraph.c:29


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:29