All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
NetworKit::LocalPartitionCoverage Class Reference

The local partition coverage is the amount of neighbors of a node u that are in the same partition as u. More...

#include <LocalPartitionCoverage.h>

Public Member Functions

 LocalPartitionCoverage (const Graph &G, const Partition &P)
 Construct the local partition coverage instance. More...
virtual void run () override
 Computes local partition coverage on the graph passed in constructor. More...
virtual double maximum () override
 Get the maximum value (1.0) More...
virtual bool isParallel () const override
 This algorithm is parallel. More...
virtual std::string toString () const override
 The name of this algorithm. More...
- Public Member Functions inherited from NetworKit::Centrality
 Centrality (const Graph &G, bool normalized=false, bool computeEdgeCentrality=false)
 Constructs the Centrality class for the given Graph G. More...
virtual ~Centrality ()=default
 Default destructor. More...
virtual std::vector< double > scores (bool moveOut=false)
 Get a vector containing the centrality score for each node in the graph. More...
virtual std::vector< double > edgeScores ()
 Get a vector containing the edge centrality score for each edge in the graph (where applicable). More...
virtual std::vector< std::pair
< node, double > > 
ranking ()
 Get a vector of pairs sorted into descending order. More...
virtual double score (node v)
 Get the centrality score of node v calculated by run(). More...
virtual double centralization ()
 Compute the centralization of a network with respect to some centrality measure. More...
- Public Member Functions inherited from NetworKit::Algorithm
 Algorithm ()
 Constructor to the algorithm base class. More...
virtual ~Algorithm ()=default
 Virtual default destructor. More...
bool hasFinished () const
 Indicates whether an algorithm has completed computation or not. More...
void assureFinished () const
 Assure that the algorithm has been run, throws a std::runtime_error otherwise. More...

Protected Attributes

const PartitionP
- Protected Attributes inherited from NetworKit::Centrality
const GraphG
std::vector< double > scoreData
std::vector< double > edgeScoreData
bool normalized
bool computeEdgeCentrality
- Protected Attributes inherited from NetworKit::Algorithm
bool hasRun
 A boolean variable indicating whether an algorithm has finished its computation or not. More...

Detailed Description

The local partition coverage is the amount of neighbors of a node u that are in the same partition as u.

Constructor & Destructor Documentation

NetworKit::LocalPartitionCoverage::LocalPartitionCoverage ( const Graph G,
const Partition P 

Construct the local partition coverage instance.

The running time of the run() method is O(m), where m is the number of edges in the graph.

GThe graph to use
PThe partition for which the coverage shall be calculated.

Member Function Documentation

bool NetworKit::LocalPartitionCoverage::isParallel ( ) const

This algorithm is parallel.


Reimplemented from NetworKit::Algorithm.

double NetworKit::LocalPartitionCoverage::maximum ( )

Get the maximum value (1.0)


Reimplemented from NetworKit::Centrality.

void NetworKit::LocalPartitionCoverage::run ( )

Computes local partition coverage on the graph passed in constructor.

Implements NetworKit::Centrality.

std::string NetworKit::LocalPartitionCoverage::toString ( ) const

The name of this algorithm.

"Local partition coverage"

Reimplemented from NetworKit::Algorithm.

Member Data Documentation

const Partition& NetworKit::LocalPartitionCoverage::P

The documentation for this class was generated from the following files: