- java.lang.Object
-
- org.jgrapht.alg.vertexcover.RecursiveExactVCImpl.BitSetCover
-
- Enclosing class:
- RecursiveExactVCImpl<V,E>
protected class RecursiveExactVCImpl.BitSetCover extends Object
Helper class which represents a vertex cover as a space efficient BitSet
-
-
Field Summary
Fields Modifier and Type Field Description protected BitSet
bitSetCover
protected double
weight
-
Constructor Summary
Constructors Modifier Constructor Description protected
BitSetCover(int size, int initialWeight)
Construct a new empty vertex cover as a BitSet.protected
BitSetCover(RecursiveExactVCImpl.BitSetCover vertexCover)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAllVertices(List<Integer> vertexIndices, double totalWeight)
Add multiple vertices in the vertex cover.protected void
addVertex(int vertexIndex, double weight)
Add a vertex in the vertex cover.protected RecursiveExactVCImpl.BitSetCover
copy()
Copy a vertex cover.
-
-
-
Field Detail
-
bitSetCover
protected BitSet bitSetCover
-
weight
protected double weight
-
-
Constructor Detail
-
BitSetCover
protected BitSetCover(int size, int initialWeight)
Construct a new empty vertex cover as a BitSet.- Parameters:
size
- initial capacity of the BitSetinitialWeight
- the initial weight
-
BitSetCover
protected BitSetCover(RecursiveExactVCImpl.BitSetCover vertexCover)
Copy constructor- Parameters:
vertexCover
- the input vertex cover to copy
-
-
Method Detail
-
copy
protected RecursiveExactVCImpl.BitSetCover copy()
Copy a vertex cover.- Returns:
- a copy of the vertex cover
-
addVertex
protected void addVertex(int vertexIndex, double weight)
Add a vertex in the vertex cover.- Parameters:
vertexIndex
- the index of the vertexweight
- the weight of the vertex
-
-