Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

CliqueFinderHeuristic.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
37 
38 namespace ogdf {
39 class AdjacencyOracle;
40 template<class E>
41 class List;
42 
44 
52 public:
54  explicit CliqueFinderHeuristic();
55 
61  inline void setPostProcessing(bool postProcess) { m_postProcess = postProcess; }
62 
72  void setDensity(double density) {
73  if (density < 0.0) {
74  m_density = 0.0;
75  } else if (density > 1.0) {
76  m_density = 1.0;
77  } else {
78  m_density = density;
79  }
80  }
81 
82 protected:
84  void doCall() override;
85 
90  void preProcess();
91 
99  void postProcessCliques(List<List<node>*>& cliqueList);
100 
112  bool allAdjacent(node v, List<node>* vList) const;
113 
121  int evaluate(node v);
122 
132  void findClique(node v, List<node>& neighbours);
133 
134 private:
135  double m_density;
136 
138 
140 
142 };
143 
144 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::CliqueFinderHeuristic::setPostProcessing
void setPostProcessing(bool postProcess)
Sets whether postprocessing should be activated.
Definition: CliqueFinderHeuristic.h:61
ogdf::CliqueFinderHeuristic::m_adjOracle
AdjacencyOracle * m_adjOracle
Adjacency oracle for m_pCopy.
Definition: CliqueFinderHeuristic.h:139
CliqueFinderModule.h
Declares ogdf::CliqueFinderModule class.
ogdf::CliqueFinderHeuristic::m_usedNode
NodeArray< bool > m_usedNode
Whether the node is already assigned to a clique.
Definition: CliqueFinderHeuristic.h:141
ogdf::List
Doubly linked lists (maintaining the length of the list).
Definition: DfsMakeBiconnected.h:40
ogdf::internal::GraphRegisteredArray
RegisteredArray for nodes, edges and adjEntries of a graph.
Definition: Graph_d.h:658
ogdf::CliqueFinderHeuristic::setDensity
void setDensity(double density)
Sets the density needed for subgraphs to be detected.
Definition: CliqueFinderHeuristic.h:72
ogdf::CliqueFinderHeuristic::m_postProcess
bool m_postProcess
Whether postprocessing should be activated.
Definition: CliqueFinderHeuristic.h:137
ogdf::CliqueFinderModule
Finds cliques.
Definition: CliqueFinderModule.h:52
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::CliqueFinderHeuristic::m_density
double m_density
Value in [0,1] defining how dense subgraphs need to be.
Definition: CliqueFinderHeuristic.h:135
ogdf::CliqueFinderHeuristic
Finds cliques and dense subgraphs using a heuristic.
Definition: CliqueFinderHeuristic.h:51
ogdf::AdjacencyOracle
Tells you in constant time if two nodes are adjacent.
Definition: AdjacencyOracle.h:48
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240