Class DenseSegmentDataset

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<CellKey,​java.lang.Object>>, SegmentDataset
    Direct Known Subclasses:
    DenseNativeSegmentDataset, DenseObjectSegmentDataset

    abstract class DenseSegmentDataset
    extends java.lang.Object
    implements SegmentDataset
    A DenseSegmentDataset is a means of storing segment values which is suitable when most of the combinations of keys have a value present.

    The storage requirements are as follows. Table requires 1 word per cell.

    Since:
    21 March, 2002
    Author:
    jhyde
    • Field Detail

      • axisMultipliers

        protected final int[] axisMultipliers
    • Constructor Detail

      • DenseSegmentDataset

        DenseSegmentDataset​(SegmentAxis[] axes)
        Creates a DenseSegmentDataset.
        Parameters:
        axes - Segment axes, containing actual column values
    • Method Detail

      • getBytes

        public final double getBytes()
        Description copied from interface: SegmentDataset
        Returns the number of bytes occupied by this dataset.
        Specified by:
        getBytes in interface SegmentDataset
        Returns:
        number of bytes
      • iterator

        public java.util.Iterator<java.util.Map.Entry<CellKey,​java.lang.Object>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<java.util.Map.Entry<CellKey,​java.lang.Object>>
      • getObject

        protected abstract java.lang.Object getObject​(int i)
      • getOffset

        protected final int getOffset​(int[] keys)
      • getOffset

        protected final int getOffset​(java.lang.Object[] keys)
      • getObject

        public java.lang.Object getObject​(CellKey pos)
        Description copied from interface: SegmentDataset
        Returns the value at a given coordinate, as an Object.
        Specified by:
        getObject in interface SegmentDataset
        Parameters:
        pos - Coordinate position
        Returns:
        Value
      • getInt

        public int getInt​(CellKey pos)
        Description copied from interface: SegmentDataset
        Returns the value at a given coordinate, as an int.
        Specified by:
        getInt in interface SegmentDataset
        Parameters:
        pos - Coordinate position
        Returns:
        Value
      • getDouble

        public double getDouble​(CellKey pos)
        Description copied from interface: SegmentDataset
        Returns the value at a given coordinate, as a double.
        Specified by:
        getDouble in interface SegmentDataset
        Parameters:
        pos - Coordinate position
        Returns:
        Value
      • getSize

        protected abstract int getSize()