- java.lang.Object
-
- org.chocosolver.solver.constraints.nary.nvalue.amnv.mis.MD
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
fifo
protected UndirectedGraph
graph
protected BitSet
inMIS
protected int
n
protected int[]
nbNeighbours
protected BitSet
out
-
Constructor Summary
Constructors Constructor Description MD(UndirectedGraph graph)
Creates an instance of the Min Degree heuristic to compute independent sets on graph
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addToMIS(int node)
void
computeMIS()
Computes an Independent Set as large as possible, although it is not necessarily maximumBitSet
getMIS()
boolean
hasNextMIS()
void
prepare()
Potentially performs some calculation before computing independent sets
-
-
-
Field Detail
-
graph
protected UndirectedGraph graph
-
n
protected int n
-
out
protected BitSet out
-
inMIS
protected BitSet inMIS
-
nbNeighbours
protected int[] nbNeighbours
-
fifo
protected int[] fifo
-
-
Constructor Detail
-
MD
public MD(UndirectedGraph graph)
Creates an instance of the Min Degree heuristic to compute independent sets on graph- Parameters:
graph
- the graph
-
-
Method Detail
-
prepare
public void prepare()
Description copied from interface:F
Potentially performs some calculation before computing independent sets
-
computeMIS
public void computeMIS()
Description copied from interface:F
Computes an Independent Set as large as possible, although it is not necessarily maximum- Specified by:
computeMIS
in interfaceF
-
addToMIS
protected void addToMIS(int node)
-
getMIS
public BitSet getMIS()
-
hasNextMIS
public boolean hasNextMIS()
- Specified by:
hasNextMIS
in interfaceF
- Returns:
- true iff the heuristic can compute another independent set
-
-