public final class IndependentSets extends Object
An independent set is a set of nodes in a graph, in which no two nodes are adjacent.
Circular nodes represent one of the independent sets of the given graph
| Modifier and Type | Method and Description |
|---|---|
static NodeList |
getIndependentSet(Graph conflictGraph)
Calculates an independent set for a given graph.
|
static NodeList[] |
getIndependentSets(Graph conflictGraph)
Partitions the set of nodes of the given graph into independent sets.
|
public static final NodeList getIndependentSet(Graph conflictGraph)
A greedy heuristic is applied which tries to find a large independent set.
simple i.e., it contains neither
parallel edges nor self-loops.conflictGraph - the input graphNodeList containing an independent set of nodesgetIndependentSet(Graph)public static final NodeList[] getIndependentSets(Graph conflictGraph)
The method iteratively calls method getIndependentSet(Graph).
simple i.e., it contains neither
parallel edges nor self-loops.conflictGraph - the input graphNodeLists each of which contains an independent set of nodesgetIndependentSet(Graph)