https://github.com/kit-parco/networkit
Raw File
Tip revision: 758758c2414c2ebf7d0a36286b6b6100f680d972 authored by cls on 16 November 2015, 18:40:09 UTC
close branch
Tip revision: 758758c
LibDemo.cpp
#include <NetworKit/io/METISGraphReader.h>
#include <NetworKit/auxiliary/Log.h>
#include <NetworKit/community/PLM.h>
#include <iostream>


int main() {
	std::cout << "simple demonstration of NetworKit as a library\n";
	Aux::Log::Settings::setLogLevel(Aux::Log::LogLevel::info);
	NetworKit::METISGraphReader reader;
	NetworKit::Graph jazz = reader.read("./input/jazz.graph");
	NetworKit::PLM plm(jazz,true);
	plm.run();
	NetworKit::Partition communities = plm.getPartition();
	std::cout << communities.numberOfSubsets() << " communities have been found\n";	
	return 0;

}

back to top