To build the project run in the same directory
$cmake CMakeLists.txt
$make
It will create the following executable:
- SubgraphCount.out
- FormatConverter.out
- sanitize.out
- ExactCount.out
- GraphProperties.out
- BaselineComparison.out
To run TETRIS, we use SubgraphCount.out.
SubgraphCount.out expects an input file in the CSR format. If the input file in the raw edges format, the following steps will convert it into the CSR format.
First run the sanitize.out on the input file to clean the raw data. It takes as input a file with edges list as pairs of strings, and creates a file in the .edges format.
Usage: ./sanitize.out path/to/out/directory/ input_filename
The .edges format has the first line with the number of nodes and edges. Each line has a distinct edge with node labels as ints starting from 0.
The second step is to take this file in the .edges format and convert it into a .CSR format. The GraphFormatConverter.out executable does this work.
Usage: ./FormatConverter.out path/to/out/directory/ input_filename
Input file must be in .edge format, where first line has number of nodes and edges, and every line has a distinct undirected edge.
To run our algorithm TETRIS, run SubgraphCount.out.
Usage: ./SubgraphCount script_file
The script_file contains all the input configuration parameters. See sample_config.txt for parameter details.
To compare the performance of TETRIS, we need an exact estimate of the number of triangles in the input graph. To compute this count, use ExactCount.out.
Usage: ./ExactCount.out input_file_name
The input_file is expected to be in the .edges format.