Class MappeableArrayContainer

    • Field Detail

      • cardinality

        protected int cardinality
    • Constructor Detail

      • MappeableArrayContainer

        public MappeableArrayContainer()
        Create an array container with default capacity
      • MappeableArrayContainer

        public MappeableArrayContainer​(ArrayContainer bc)
        Creates a new container from a non-mappeable one. This copies the data.
        Parameters:
        bc - the original container
      • MappeableArrayContainer

        public MappeableArrayContainer​(int capacity)
        Create an array container with specified capacity
        Parameters:
        capacity - The capacity of the container
      • MappeableArrayContainer

        public MappeableArrayContainer​(int firstOfRun,
                                       int lastOfRun)
        Create an array container with a run of ones from firstOfRun to lastOfRun, exclusive. Caller is responsible for making sure the range is small enough that ArrayContainer is appropriate.
        Parameters:
        firstOfRun - first index
        lastOfRun - last index (range is exclusive)
      • MappeableArrayContainer

        public MappeableArrayContainer​(ShortBuffer array,
                                       int cardinality)
        Construct a new ArrayContainer backed by the provided ShortBuffer. Note that if you modify the ArrayContainer a new ShortBuffer may be produced.
        Parameters:
        array - ShortBuffer where the data is stored
        cardinality - cardinality (number of values stored)