Package org.graph4j.util
Class Clique
java.lang.Object
org.graph4j.util.VertexCollection
org.graph4j.util.VertexSet
org.graph4j.util.Clique
A clique is a set of vertices of a graph such that any two of them
are adjacent.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.util.VertexCollection
bitset, DEFAULT_CAPACITY, first, graph, numVertices, vertices -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.graph4j.util.VertexSet
add, addAll, addDirectly, clear, contains, equals, hashCode, indexOf, intersection, intersection, peek, pop, remove, removeFromPos, unionMethods inherited from class org.graph4j.util.VertexCollection
computeVerticesWeight, getGraph, grow, indexOf, isClique, isEmpty, isStableSet, iterator, numVertices, removeAll, removeLast, retainAll, size, toString, union, vertexToString, verticesMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Clique
-
Clique
-
Clique
- Parameters:
graph- the graph this clique belongs to.vertices- the vertices of the clique.
-
Clique
- Parameters:
other- a vertex set.
-
-
Method Details
-
union
-
checkEdge
protected void checkEdge(int v, int u) -
checkEdges
protected final void checkEdges() -
isValid
public boolean isValid()Checks if the vertices in this set actually represent a clique.- Returns:
trueif the clique is valid,falseotherwise.
-
isMaximal
public boolean isMaximal()Checks if the clique is maximal.- Returns:
trueif the clique is maximal,falseotherwise.
-