Class RecursiveExactVCImpl.BitSetCover

  • Enclosing class:

    protected class RecursiveExactVCImpl.BitSetCover
    extends java.lang.Object
    Helper class which represents a vertex cover as a space efficient BitSet
    • Field Summary

      Modifier and Type Field Description
      protected java.util.BitSet bitSetCover  
      protected double weight  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addAllVertices​(java.util.List<java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bitSetCover

        protected java.util.BitSet bitSetCover
      • weight

        protected double weight
    • Constructor Detail

      • BitSetCover

        protected BitSetCover​(int size,
                              int initialWeight)
        Construct a new empty vertex cover as a BitSet.
        size - initial capacity of the BitSet
        initialWeight - the initial weight
      • BitSetCover

        protected BitSetCover​(RecursiveExactVCImpl.BitSetCover vertexCover)
        Copy constructor
        vertexCover - the input vertex cover to copy
    • Method Detail

      • addVertex

        protected void addVertex​(int vertexIndex,
                                 double weight)
        Add a vertex in the vertex cover.
        vertexIndex - the index of the vertex
        weight - the weight of the vertex
      • addAllVertices

        protected void addAllVertices​(java.util.List<java.lang.Integer> vertexIndices,
                                      double totalWeight)
        Add multiple vertices in the vertex cover.
        vertexIndices - the index of the vertices
        totalWeight - the total weight of the vertices