Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_K |
protected UndirectedGraph |
graph |
protected BitSet |
inMIS |
protected int |
iter |
protected int |
k |
protected int |
n |
protected BitSet |
out |
protected Random |
rd |
Constructor and Description |
---|
Rk(UndirectedGraph graph)
Creates an instance of the Random heuristic to compute independent sets on graph
uses the default setting DEFAULT_K=30
|
Rk(UndirectedGraph graph,
int k)
Creates an instance of the Random heuristic to compute independent sets on graph
|
Modifier and Type | Method and Description |
---|---|
void |
computeMIS()
Computes an Independent Set as large as possible, although it is not necessarily maximum
|
void |
duplicate(Solver solver,
gnu.trove.map.hash.THashMap<Object,Object> identitymap) |
BitSet |
getMIS() |
boolean |
hasNextMIS() |
void |
prepare()
Potentially performs some calculation before computing independent sets
|
public static int DEFAULT_K
protected UndirectedGraph graph
protected int n
protected int k
protected int iter
protected BitSet out
protected BitSet inMIS
protected Random rd
public Rk(UndirectedGraph graph, int k)
graph
- on which IS have to be computedk
- number of iterations (i.e. number of expected IS per propagation)public Rk(UndirectedGraph graph)
graph
- on which IS have to be computedpublic void prepare()
F
public void computeMIS()
F
computeMIS
in interface F
public BitSet getMIS()
public boolean hasNextMIS()
hasNextMIS
in interface F
Copyright © 2015. All rights reserved.