All Distance Sketch
0.1
All distance sketch based algorithms
|
To use the package in your code you must include ${ADS_DEST}/include/all_distance_sketch.h and link with ${ADS_DEST}/lib/liball_distance_sketch.a
Compiling your_code.cpp:
>g++ --std=c++11 your_code.cpp -I${SNAP_DEST}/snap-adv/ -I${SNAP_DEST}/snap-core/ -I${SNAP_DEST}/snap-exp/ -I${SNAP_DEST}/glib-core/ ${ADS_DEST}/lib/liball_distance_sketch.a ${SNAP_DEST}/snap-core/Snap.o -o your_code
You can run the algorithms as apps. When building the pakcage the apps will be located in the ${ADS_DEST}/bin. run –help to see the options that each such app can take. The application that calculates the all distance sketch:
>./bin/sketch_app --help Usage: options_description [options] Allowed options: --help produce help message --K arg K = 1/epsilon^2 sets the precision --num_threads arg (=1) num_threads to use --directed arg is the graph directed --graph_dir arg Directory with the graph to calculate the sketch on --output_file arg output file path pattern, here the sketch Gpb will be saved with the prefix entered and suffix _[%d] (Gpb defined in src/proto/all_distance_sketch.proto)
App for calculating the reverse ranks of a single node.
>bin/reverse_rank_app --help Allowed options: --help produce help message --source_id arg id of source node --K arg K = 1/epsilon^2 sets the precision --num_threads arg (=1) num_threads to use --directed arg is the graph directed --graph_dir arg Directory with the graph to calculate the sketch on --sketch_file arg File prefix with the calculated sketch. The prefix should match what you entered in the sketch_app --output_file arg output file path, here the sketch Gpb will be saved (Gpb defined in src/proto/all_distance_sketch.proto)
App for calculating the exact reverse rank greedy cover.
>bin/t_skim_exact_app --help Allowed options: --help produce help message --T arg Defines the influence of a node. If pi_{us} < T then s coveres u --directed arg is the graph directed --graph_dir arg Directory with the graph to calculate the sketch on --output_file arg output file path, here the cover will be saved in Gpb format (Gpb defined in src/proto/cover.proto)
App for calculating the approximate reverse rank greedy cover using TSkim.
>bin/t_skim_reverse_rank_app --help Usage: options_description [options] Allowed options: --help produce help message --T arg Defines the influence of a node. If pi_{us} < T then s coveres u --K arg K = 1/epsilon^2 sets the precision (Only relevant if you don't provide sketch_file option) --num_threads arg (=1) num_threads to use (Only relevant if you don't provide sketch_file option) --min_influence_for_seed_set arg min influence to enter to the seed set --directed arg is the graph directed --graph_dir arg Directory with the graph to calculate the sketch on --sketch_file arg File prefix with the calculated sketch. The prefix should match what you entered in the sketch_app --output_file arg output file path, here the cover will be saved in Gpb format (Gpb defined in src/proto/cover.proto)