Finds cliques.
More...
#include <ogdf/clique/CliqueFinderModule.h>
Finds cliques.
A CliqueFinderModule can be called on a graph to retrieve (disjoint) cliques.
Definition at line 52 of file CliqueFinderModule.h.
◆ CliqueFinderModule()
| ogdf::CliqueFinderModule::CliqueFinderModule |
( |
| ) |
|
|
inlineexplicit |
◆ ~CliqueFinderModule()
| virtual ogdf::CliqueFinderModule::~CliqueFinderModule |
( |
| ) |
|
|
inlinevirtual |
◆ beginCall()
| void ogdf::CliqueFinderModule::beginCall |
( |
const Graph & |
G | ) |
|
|
private |
Initializes member variables and calls doCall().
- Parameters
-
| G | The graph in which to search for cliques. |
◆ call() [1/2]
| void ogdf::CliqueFinderModule::call |
( |
const Graph & |
G, |
|
|
List< List< node > * > & |
cliqueLists |
|
) |
| |
Searches for cliques and returns the list of cliques.
Each clique is represented by a list of member nodes in the list of cliques cliqueLists.
- Parameters
-
| G | The graph on which the clique finding algorithm is called. |
| cliqueLists | The list of cliques. |
◆ call() [2/2]
| void ogdf::CliqueFinderModule::call |
( |
const Graph & |
G, |
|
|
NodeArray< int > & |
cliqueNumber |
|
) |
| |
Searches for cliques and sets 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 or -1 if the node is not a clique member.
- Parameters
-
| G | The graph on which the clique finding algorithm is called. |
| cliqueNumber | The clique number for each node. |
◆ cliqueGraphAttributes()
Labels and colors nodes in the given GraphAttributes according to their clique number.
Note that the coordinates of the nodes are not changed: A separate layout algorithm has to be used to this end.
- Parameters
-
| G | Graph the cliques belong to. |
| cliqueNumber | The clique number for each node. |
| GA | Is assigned the node colors and labels. |
◆ cliqueListToNumber()
| static void ogdf::CliqueFinderModule::cliqueListToNumber |
( |
const Graph & |
G, |
|
|
const List< List< node > * > & |
cliqueLists, |
|
|
NodeArray< int > & |
cliqueNumber |
|
) |
| |
|
static |
Uses a list of cliques to get the clique number of each node.
- Parameters
-
| G | Graph the cliques belong to. |
| cliqueLists | List of lists, each one representing a clique. |
| cliqueNumber | Is assigned the clique number for each node. |
◆ cliqueNumberToList()
| static void ogdf::CliqueFinderModule::cliqueNumberToList |
( |
const Graph & |
G, |
|
|
const NodeArray< int > & |
cliqueNumber, |
|
|
List< List< node > * > & |
cliqueLists |
|
) |
| |
|
static |
Uses the clique number for each node to create a list of cliques.
- Parameters
-
| G | Graph the cliques belong to. |
| cliqueNumber | The clique number for each node. |
| cliqueLists | Is assigned a list of lists, each one representing a clique. |
◆ cliqueOK()
| static bool ogdf::CliqueFinderModule::cliqueOK |
( |
const Graph & |
G, |
|
|
List< node > * |
clique, |
|
|
double |
density = 1.0 |
|
) |
| |
|
static |
Checks whether density times the number of possible edges exist between clique members.
- Parameters
-
| G | Graph the cliques belong to. |
| clique | The clique to check. |
| density | The fraction in [0,1] of possible edges between clique members that have to exist in order for the check to succeed. |
- Returns
- Whether the check succeeded.
◆ doCall()
| virtual void ogdf::CliqueFinderModule::doCall |
( |
| ) |
|
|
protectedpure virtual |
◆ endCall()
| void ogdf::CliqueFinderModule::endCall |
( |
| ) |
|
|
private |
◆ handleTrivialCases()
| bool ogdf::CliqueFinderModule::handleTrivialCases |
( |
| ) |
|
|
private |
◆ setMinSize()
| void ogdf::CliqueFinderModule::setMinSize |
( |
int |
i | ) |
|
|
inline |
◆ setResults() [1/2]
| void ogdf::CliqueFinderModule::setResults |
( |
List< List< node > * > & |
cliqueLists | ) |
|
|
private |
Sets the results of doCall() using m_copyCliqueNumber.
- Warning
- The caller is responsible for deleting the list pointers.
- Parameters
-
| cliqueLists | Is assigned a list of pointers, each one pointing to a list of nodes representing a clique. |
◆ setResults() [2/2]
| void ogdf::CliqueFinderModule::setResults |
( |
NodeArray< int > & |
cliqueNumber | ) |
|
|
private |
◆ m_copyCliqueNumber
| NodeArray<int> ogdf::CliqueFinderModule::m_copyCliqueNumber |
|
protected |
◆ m_minDegree
| int ogdf::CliqueFinderModule::m_minDegree |
|
protected |
◆ m_pCopy
◆ m_pGraph
| const Graph* ogdf::CliqueFinderModule::m_pGraph |
|
private |
The documentation for this class was generated from the following file: