Finds cliques and dense subgraphs. More...
#include <ogdf/graphalg/CliqueFinder.h>
Public Types | |
| enum | postProcess { postProcess::None, postProcess::Simple } |
Public Member Functions | |
| CliqueFinder (const Graph &G) | |
| ~CliqueFinder () | |
| void | call (NodeArray< int > &cliqueNumber) |
| Searches for cliques and returns the clique index number for each node. More... | |
| void | call (List< List< node > > &cliqueLists) |
| Searches for cliques and returns the list of cliques. More... | |
| void | setDensity (int density) |
| Sets the abstract measure of density needed for subgraphs to be detected. More... | |
| void | setMinSize (int i) |
| the minimum degree of the nodes within the clique/subgraph More... | |
Protected Member Functions | |
| bool | allAdjacent (node v, List< node > *vList) |
| bool | cliqueOK (List< node > *clique) |
| void | doCall (int minDegree=2) |
| doing the real work, find subgraphs in graph G, skip all nodes with degree < minDegree value 2: all triangles are cliques More... | |
| int | evaluate (node v, EdgeArray< bool > &usableEdge) |
| void | findClique (node v, List< node > &neighbours, int numRandom=0) |
| void | postProcessCliques (List< List< node > * > &cliqueList, EdgeArray< bool > &usableEdge) |
| void | setResults (NodeArray< int > &cliqueNumber) |
| void | setResults (List< List< node > > &cliqueLists) |
| void | setResults (List< List< node > * > &cliqueLists) |
| void | writeGraph (Graph &G, NodeArray< int > &cliqueNumber, const char *fileName) |
Private Attributes | |
| bool | m_callByList |
| NodeArray< int > | m_copyCliqueNumber |
| int | m_density |
| int | m_minDegree |
| int | m_numberOfCliques |
| GraphCopy * | m_pCopy |
| const Graph * | m_pGraph |
| List< List< node > > * | m_pList |
| postProcess | m_postProcess |
| NodeArray< bool > | m_usedNode |
Finds cliques and dense subgraphs.
The class CliqueFinder can be called on a graph to retrieve (disjoint) cliques or dense subgraphs respectively. Uses SPQR trees to find 3-connected components.
In the following, clique always stands for a subgraph with properties that can be defined by the user to change the standard definition of a complete subgraph, e.g. a minimum size/degree etc. We search for cliques in graph G by first dividing G into its triconnnected components and then using a greedy heuristics within each component
Definition at line 60 of file CliqueFinder.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Simple | |
Definition at line 87 of file CliqueFinder.h.
|
explicit |
| ogdf::CliqueFinder::~CliqueFinder | ( | ) |
| void ogdf::CliqueFinder::call | ( | NodeArray< int > & | cliqueNumber | ) |
Searches for cliques and returns the clique index number for each node.
Each clique will be assigned a different number, each node gets the number of the clique it is contained in, -1 if not a clique member
Searches for cliques and returns the list of cliques.
Each clique on return is represented by a list of member nodes in the list of cliques cliqueLists
|
protected |
doing the real work, find subgraphs in graph G, skip all nodes with degree < minDegree value 2: all triangles are cliques
|
protected |
|
protected |
|
inline |
Sets the abstract measure of density needed for subgraphs to be detected.
Does not have an effect for graphs with less than 4 nodes.
Definition at line 93 of file CliqueFinder.h.
|
inline |
the minimum degree of the nodes within the clique/subgraph
Definition at line 86 of file CliqueFinder.h.
|
protected |
|
protected |
|
private |
Definition at line 148 of file CliqueFinder.h.
|
private |
Definition at line 140 of file CliqueFinder.h.
|
private |
Definition at line 151 of file CliqueFinder.h.
|
private |
Definition at line 145 of file CliqueFinder.h.
|
private |
Definition at line 146 of file CliqueFinder.h.
|
private |
Definition at line 139 of file CliqueFinder.h.
|
private |
Definition at line 138 of file CliqueFinder.h.
Definition at line 149 of file CliqueFinder.h.
|
private |
Definition at line 147 of file CliqueFinder.h.
|
private |
Definition at line 141 of file CliqueFinder.h.