Class DenseDoubleSegmentBody

  • All Implemented Interfaces:
    java.io.Serializable, SegmentBody

    class DenseDoubleSegmentBody
    extends AbstractSegmentBody
    Implementation of a segment body which stores the data inside a dense primitive array of double precision numbers.
    Author:
    LBoudreau
    • Constructor Detail

      • DenseDoubleSegmentBody

        DenseDoubleSegmentBody​(java.util.BitSet nullValues,
                               double[] values,
                               java.util.List<Pair<java.util.SortedSet<java.lang.Comparable>,​java.lang.Boolean>> axes)
        Creates a DenseDoubleSegmentBody.

        Stores the given array of cell values and null indicators; caller must not modify them afterwards.

        Parameters:
        nullValues - A bit-set indicating whether values are null. Each position in the bit-set corresponds to an offset in the value array. If position is null, the corresponding entry in the value array will also be 0.
        values - Cell values
        axes - Axes
    • Method Detail

      • getSize

        protected int getSize()
        Description copied from class: AbstractSegmentBody
        Returns the overall amount of stored elements, including those, that are considered to be null.
        Specified by:
        getSize in class AbstractSegmentBody
        Returns:
        the size of stored data
      • getEffectiveSize

        protected int getEffectiveSize()
        Description copied from class: AbstractSegmentBody
        Returns the amount of non-null elements. This amount is equal to number of elements that getValueMap().entrySet().iterator() is returned. By default the method executes getSize().
        Overrides:
        getEffectiveSize in class AbstractSegmentBody
        Returns:
        the effective size of stored data
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object