All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StablePartitionNodes.h
Go to the documentation of this file.
1 #ifndef STABLEPARTITIONNODES_H
2 #define STABLEPARTITIONNODES_H
3 
5 
6 namespace NetworKit {
7 
15 public:
16  using LocalPartitionEvaluation::LocalPartitionEvaluation; // inherit constructor
17 
21  virtual void run() override;
22 
29  bool isStable(node u) const { assureFinished(); return static_cast<bool>(stableMarker[u]); };
30 
36  virtual bool isSmallBetter() const override { return false; }
37 private:
38  std::vector<uint8_t> stableMarker;
39 };
40 
41 }
42 
43 #endif // STABLEPARTITIONNODES_H
LocalPartitionEvaluation(const Graph &G, const Partition &P)
Initialize the partition evaluation method.
Definition: LocalPartitionEvaluation.cpp:7
Virtual base class of all evaluation methods for a single Partition which is based on the evaluation ...
Definition: LocalPartitionEvaluation.h:14
virtual bool isSmallBetter() const override
If small values are better.
Definition: StablePartitionNodes.h:36
bool isStable(node u) const
Check if a given node is stable, i.e.
Definition: StablePartitionNodes.h:29
index node
Definition: Globals.h:23
Evaluates how stable a given partition is.
Definition: StablePartitionNodes.h:14
void assureFinished() const
Assure that the algorithm has been run, throws a std::runtime_error otherwise.
Definition: Algorithm.h:42
virtual void run() override
Execute the algorithm.
Definition: StablePartitionNodes.cpp:10