Class MDRk
- java.lang.Object
-
- org.chocosolver.solver.constraints.nary.nvalue.amnv.mis.MD
-
- org.chocosolver.solver.constraints.nary.nvalue.amnv.mis.MDRk
-
-
Constructor Summary
Constructors Constructor Description MDRk(UndirectedGraph graph)Creates an instance of the Min Degree + Random k heuristic to compute independent sets on graphMDRk(UndirectedGraph graph, int k)Creates an instance of the Min Degree + Random k heuristic to compute independent sets on graph
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeMIS()Computes an Independent Set as large as possible, although it is not necessarily maximumprotected voidcomputeMISRk()booleanhasNextMIS()voidprepare()Potentially performs some calculation before computing independent sets
-
-
-
Field Detail
-
k
protected int k
-
iter
protected int iter
-
rd
protected Random rd
-
-
Constructor Detail
-
MDRk
public MDRk(UndirectedGraph graph, int k)
Creates an instance of the Min Degree + Random k heuristic to compute independent sets on graph- Parameters:
graph- the grahk- number of random iterations
-
MDRk
public MDRk(UndirectedGraph graph)
Creates an instance of the Min Degree + Random k heuristic to compute independent sets on graph- Parameters:
graph- the graph
-
-
Method Detail
-
prepare
public void prepare()
Description copied from interface:FPotentially performs some calculation before computing independent sets
-
computeMIS
public void computeMIS()
Description copied from interface:FComputes an Independent Set as large as possible, although it is not necessarily maximum- Specified by:
computeMISin interfaceF- Overrides:
computeMISin classMD
-
computeMISRk
protected void computeMISRk()
-
hasNextMIS
public boolean hasNextMIS()
- Specified by:
hasNextMISin interfaceF- Overrides:
hasNextMISin classMD- Returns:
- true iff the heuristic can compute another independent set
-
-