java.lang.Object
org.jgrapht.alg.clique.BaseBronKerboschCliqueFinder<V,E>
org.jgrapht.alg.clique.BronKerboschCliqueFinder<V,E>
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
Iterable<Set<V>>,MaximalCliqueEnumerationAlgorithm<V,E>
Bron-Kerbosch maximal clique enumeration algorithm.
Implementation of the Bron-Kerbosch clique enumeration algorithm as described in:
- R. Samudrala and J. Moult. A graph-theoretic algorithm for comparative modeling of protein structure. Journal of Molecular Biology, 279(1):287--302, 1998.
The algorithm first computes all maximal cliques and then returns the result to the user. A timeout can be set using the constructor parameters.
- See Also:
-
Field Summary
Fields inherited from class org.jgrapht.alg.clique.BaseBronKerboschCliqueFinder
allMaximalCliques, graph, maxSize, nanos, timeLimitReached -
Constructor Summary
ConstructorsConstructorDescriptionBronKerboschCliqueFinder(Graph<V, E> graph) Constructs a new clique finder.BronKerboschCliqueFinder(Graph<V, E> graph, long timeout, TimeUnit unit) Constructs a new clique finder. -
Method Summary
Methods inherited from class org.jgrapht.alg.clique.BaseBronKerboschCliqueFinder
isTimeLimitReached, iterator, maximumIteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
BronKerboschCliqueFinder
Constructs a new clique finder.- Parameters:
graph- the input graph; must be simple
-
BronKerboschCliqueFinder
Constructs a new clique finder.- Parameters:
graph- the input graph; must be simpletimeout- the maximum time to wait, if zero no timeoutunit- the time unit of the timeout argument
-
-
Method Details
-
lazyRun
protected void lazyRun()Lazily execute the enumeration algorithm.- Specified by:
lazyRunin classBaseBronKerboschCliqueFinder<V,E>
-
findCliques
-