| Modifier and Type | Field and Description |
|---|---|
static int |
defaultKValue
number of random iterations
|
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
|
BitSet |
getMIS() |
boolean |
hasNextMIS() |
void |
prepare()
Potentially performs some calculation before computing independent sets
|
public static int defaultKValue
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()
Fpublic void computeMIS()
FcomputeMIS in interface Fpublic BitSet getMIS()
public boolean hasNextMIS()
hasNextMIS in interface FCopyright © 2017. All rights reserved.