Class MutableBitSliceIndex

    • Constructor Detail

      • MutableBitSliceIndex

        public MutableBitSliceIndex​(int maxValue,
                                    int minValue,
                                    org.roaringbitmap.buffer.MutableRoaringBitmap[] bA,
                                    org.roaringbitmap.buffer.MutableRoaringBitmap ebM)
        construct a new ImmutableBitSliceIndex from raw slice
        Parameters:
        maxValue - max value for this bsi
        minValue - min value for this bsi
        bA - bit slices for this bsi.using MutableRoaringBitmap array express
        ebM - exits value bitmap,use MutableRoaringBitmap express
      • MutableBitSliceIndex

        public MutableBitSliceIndex​(int minValue,
                                    int maxValue)
        construct a new MutableBitSliceIndex. Min/Max values are optional. If set to 0 then the underlying BSI will be automatically sized.
      • MutableBitSliceIndex

        public MutableBitSliceIndex()
        constructs an auto-sized BSI
    • Method Detail

      • runOptimize

        public void runOptimize()
        RunOptimize attempts to further compress the runs of consecutive values found in the bitmap
      • hasRunCompression

        public boolean hasRunCompression()
      • addDigit

        public void addDigit​(org.roaringbitmap.buffer.MutableRoaringBitmap foundSet,
                             int i)
      • getExistenceBitmap

        public org.roaringbitmap.buffer.MutableRoaringBitmap getExistenceBitmap()
      • getMutableSlice

        public org.roaringbitmap.buffer.MutableRoaringBitmap getMutableSlice​(int i)
      • setValue

        public void setValue​(int columnId,
                             int value)
        SetValue sets a value for a given columnID.
        Specified by:
        setValue in interface BitmapSliceIndex
        Parameters:
        columnId - columnID
        value - the value for columnID
      • setValues

        public void setValues​(java.util.List<Pair<java.lang.Integer,​java.lang.Integer>> values,
                              java.lang.Integer currentMaxValue,
                              java.lang.Integer currentMinValue)
        Description copied from interface: BitmapSliceIndex
        setValues will batch set value for this bsi. currentMaxValue/currentMinValue are optional,it's can be compute from input value list. and avoiding bsi expend slice array capacity.
        Specified by:
        setValues in interface BitmapSliceIndex
      • merge

        public void merge​(MutableBitSliceIndex otherBsi)
        merge will merge 2 bsi into current merge API was designed for distributed computing NOTE: current and other bsi have no intersection
      • serialize

        public void serialize​(java.io.DataOutput output)
                       throws java.io.IOException
        Specified by:
        serialize in interface BitmapSliceIndex
        Throws:
        java.io.IOException
      • deserialize

        public void deserialize​(java.nio.ByteBuffer buffer)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • deserialize

        public void deserialize​(java.io.DataInput in)
                         throws java.io.IOException
        Throws:
        java.io.IOException