Class IndexSet


  • public class IndexSet
    extends Object
    BitArray implementation of an IndexSet, realized in long[], used by the Gaussian solver. The xor() operation has complexity O(n), where n is the sum of the size of the two argument arrays. Since here 64 xor's are done at once, this implementation is very fast compared to other algorithms with the same complexity.
    Author:
    Tilman Neumann
    • Constructor Detail

      • IndexSet

        public IndexSet​(int numberOfBits)
        Standard constructor, creates an empty bit array capable to hold the given numberOfBits.
        Parameters:
        numberOfBits -
    • Method Detail

      • add

        public void add​(int x)
        Add a single element x to this index set.
        Parameters:
        x -
      • contains

        public boolean contains​(Object o)
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if this set is empty
      • addXor

        public void addXor​(IndexSet other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object