Class ArrayBitSet

java.lang.Object
com.github.jelmerk.knn.util.ArrayBitSet
All Implemented Interfaces:
Serializable

public class ArrayBitSet extends Object implements Serializable
Bitset.
See Also:
  • Constructor Details

    • ArrayBitSet

      public ArrayBitSet(int count)
      Initializes a new instance of the ArrayBitSet class.
      Parameters:
      count - The number of items in the set.
    • ArrayBitSet

      public ArrayBitSet(ArrayBitSet other, int count)
      Initializes a new instance of the ArrayBitSet class. and copies the values of another bitset.
      Parameters:
      other - other bitset
      count - The number of items in the set.
  • Method Details

    • contains

      public boolean contains(int bitIndex)
      Returns true if this set contains the specified element
    • add

      public void add(int id)
      Add element to the bitset.
      Parameters:
      id - element to add
    • remove

      public void remove(int id)
      Removes element from the bitset.
      Parameters:
      id - element to remove
    • clear

      public void clear()
      Clears the bitset.