Class SparseSegmentDataset

  • All Implemented Interfaces:
    Iterable<Map.Entry<CellKey,​Object>>, SegmentDataset

    class SparseSegmentDataset
    extends Object
    implements SegmentDataset
    A SparseSegmentDataset is a means of storing segment values which is suitable when few of the combinations of keys have a value present.

    The storage requirements are as follows. Key is 1 word for each dimension. Hashtable entry is 3 words. Value is 1 word. Total space is (4 + d) * v. (May also need hash table to ensure that values are only stored once.)

    NOTE: This class is not synchronized.

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

      • SparseSegmentDataset

        SparseSegmentDataset()
        Creates an empty SparseSegmentDataset.
      • SparseSegmentDataset

        SparseSegmentDataset​(Map<CellKey,​Object> values)
        Creates a SparseSegmentDataset with a given value map. The map is not copied; a reference to the map is retained inside the dataset, and therefore the contents of the dataset will change if the map is modified.
        Parameters:
        values - Value map