Implementation of the Bron-Kerbosch clique-detection algorithm [BKA].
More...
#include <BronKerboschAlgorithm.hpp>
Implementation of the Bron-Kerbosch clique-detection algorithm [BKA].
◆ BronKerboschAlgorithm() [1/3]
| CDPL::Util::BronKerboschAlgorithm::BronKerboschAlgorithm |
( |
| ) |
|
|
inline |
Constructs the BronKerboschAlgorithm instance without an associated adjacency matrix.
◆ BronKerboschAlgorithm() [2/3]
| CDPL::Util::BronKerboschAlgorithm::BronKerboschAlgorithm |
( |
const BitSetArray & |
adj_mtx | ) |
|
Constructs the BronKerboschAlgorithm instance and immediately initializes it with the adjacency matrix adj_mtx.
- Parameters
-
| adj_mtx | The graph adjacency matrix (one Util::BitSet per node). |
◆ BronKerboschAlgorithm() [3/3]
Constructs a copy of the BronKerboschAlgorithm instance bka.
- Parameters
-
| bka | The BronKerboschAlgorithm instance to copy. |
◆ init()
| void CDPL::Util::BronKerboschAlgorithm::init |
( |
const BitSetArray & |
adj_mtx | ) |
|
(Re-)initializes the algorithm with the adjacency matrix adj_mtx and resets the clique iterator.
- Parameters
-
| adj_mtx | The graph adjacency matrix (one Util::BitSet per node). |
◆ nextClique()
| bool CDPL::Util::BronKerboschAlgorithm::nextClique |
( |
BitSet & |
clique | ) |
|
Advances the clique iterator and writes the next maximal clique into clique.
- Parameters
-
| clique | The output clique (set of node indices). |
- Returns
true if a clique was emitted, and false when the iteration is exhausted.
◆ operator=()
Copy assignment operator.
- Parameters
-
| bka | The other BronKerboschAlgorithm instance. |
- Returns
- A reference to itself.
The documentation for this class was generated from the following file: