README for ptSpar
Introduction
ptSpar is a C++ program implementing a Neighborhood-Preserving Graph Sparsification technique. This tool reduces graph sizes while maintaining essential neighborhood information, aiding in various graph analysis tasks.
Requirements
- C++11 compliant compiler (e.g., GCC)
- Boost Program Options Library
Compilation
- Install Boost Library: Ensure the Boost Program Options library is installed on your system.
-
Compilation Command: Create a build directory and cd into it, and execute the following commands:
cmake ..
make
Usage
-
Basic Command Structure:
./ptSpar --input [input file] --output_file [output file] [additional options]
-
Key Options:
-
--input
: Path to the input graph file. -
--output_file
: Path for the output (compressed graph). -
--directed
: Specify if the graph is directed (true/false). -
--algorithm
: Choose the compression algorithm (e.g., Random, LP, SA, Greedy). -
--depth
: Define the depth of the compression. -
--proportions
: Set preserving proportions.
-
Example
./ptSpar --input myGraph.txt --output_file compressedGraph.txt --directed true --algorithm Random --depth 2 --proportions 0 0.5 0.5