The aim of this university project is analyze the algorithm exposed here.
for this purpose i proceeded following this steps:
- Verify the algorithm coplexity;
- Test performances of the algorithm changing and optimize it.
before running the python code make sure you have already done follow steps (assuming that you are using a Linux base environment):
- install python and pip (sudo apt install python3 python3-pip)
- install necessary library (pip install -r requirements.txt)
before running the C++ code make sure you have already done follow steps (assuming that you are using a Linux base environment):
- install g++ (sudo apt install g++ )
- install cmake (sudo apt install cmake)
- install gpp (sudo apt install gpp)
- install libboost filesystem library (sudo apt install libboost-filesystem-dev)
- install libboost serialization library (sudo apt install libboost-serialization-dev)
- install libboost_program_options library (sudo apt install libboost-program-options-dev)
- install libboost_timer library (sudo apt install libboost-timer-dev)
- install networkit (istallation guide)
- set LD_LIBRARY_PATH environment variable to networkit library location or move it to /usr/lib/ (write on ~/.bashrc export LD_LIBRARY_PATH=location/networkit/build/)
once the python initial setup is completed you can run python code just follow this steps:
- navigate to the 'python_implementation' directory (cd python_implementation)
- set appropriately the option and run code (python3 algorithms_implementation.py -g < graphPath > -f < executionFlag > -p < partitionPath > -u) (the only mandatory option is the graphPath)
- input the path to the graph when prompted
once the C++ initial setup is completed you can run C++ code just follow this steps:
- navigate to the 'c++_implementation' directory (cd c++_implementation)
- compile code (make release)
- set appropriately the option and run code (./main -g < graphPath > -f < executionFlag > -p < partitionPath > -u true) (the only mandatory option is the graphPath)
once both setup is completed you can exec doubling experiment just follow this steps:
- navigate to the 'c++_implementation' directory (cd c++_implementation)
- compile code (make release)
- navigate to the 'double_experiment' directory (cd ../double_experiment)
- setup experiment config (doubleexp_config.json)
- run double_experiment file (python3 double_experiment.py)
once python setup is completed you can generate new graphs just follow this steps:
- navigate to the 'graphs_generators' directory (cd utility/graphs_generators)
- setup graphs generator config (genconfig.json)
- generate graphs (python3 generate.py)
once python setup is completed you can generate new partition just follow this steps:
- navigate to the 'partition_generators' directory (cd utility/partition_generators)
- setup partitions generator config (partition_config.json)
- generate graphs (python3 compute_partition.py)
- all results could be found in "results" folder
- the analysis of the results could be found in "analysis" folder
- all generated graphs could be found in "graphs" folder
- all generated partitions could be found in "partial_results/partitions" folder