Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

CliqueFinderHeuristic.h
Go to the documentation of this file.
1 
32 #pragma once
33 
36 
37 namespace ogdf{
38 
40 
48 
49 public:
51  explicit CliqueFinderHeuristic();
52 
58  inline void setPostProcessing(bool postProcess) {
59  m_postProcess = postProcess;
60  }
61 
71  void setDensity(double density) {
72  if (density < 0.0) {
73  m_density = 0.0;
74  } else if (density > 1.0) {
75  m_density = 1.0;
76  } else {
77  m_density = density;
78  }
79  }
80 
81 protected:
83  void doCall() override;
84 
89  void preProcess();
90 
98  void postProcessCliques(List<List<node>*> &cliqueList);
99 
111  bool allAdjacent(node v, List<node>* vList) const;
112 
120  int evaluate(node v);
121 
131  void findClique(node v, List<node> &neighbours);
132 
133 private:
134  double m_density;
135 
137 
139 
141 };
142 
143 }
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of ogdf::AdjacencyOracle class.
Finds cliques and dense subgraphs using a heuristic.
double m_density
Value in [0,1] defining how dense subgraphs need to be.
void setDensity(double density)
Sets the density needed for subgraphs to be detected.
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
bool m_postProcess
Whether postprocessing should be activated.
Declares ogdf::CliqueFinderModule class.
NodeArray< bool > m_usedNode
Whether the node is already assigned to a clique.
Class for the representation of nodes.
Definition: Graph_d.h:169
Tells you in constant time if two nodes are adjacent.
AdjacencyOracle * m_adjOracle
Adjacency oracle for m_pCopy.
The namespace for all OGDF objects.
void setPostProcessing(bool postProcess)
Sets whether postprocessing should be activated.