mondrian.rolap.agg
Class SparseSegmentDataset
java.lang.Object
mondrian.rolap.agg.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
-
-
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SparseSegmentDataset
SparseSegmentDataset(Segment segment)
get
public Object get(CellKey pos)
- Description copied from interface:
SegmentDataset
- Returns the value at a given coordinate.
- Specified by:
get
in interface SegmentDataset
- Parameters:
pos
- Coordinate position
- Returns:
- Value
put
public void put(CellKey key,
Object value)
- Specified by:
put
in interface SegmentDataset
iterator
public Iterator<Map.Entry<CellKey,Object>> iterator()
- Specified by:
iterator
in interface Iterable<Map.Entry<CellKey,Object>>
getBytes
public 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