mondrian.rolap.agg
Class SparseSegmentDataset

java.lang.Object
  extended by 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
Version:
$Id: //open/mondrian-release/3.0/src/main/mondrian/rolap/agg/SparseSegmentDataset.java#2 $
Author:
jhyde

Constructor Summary
SparseSegmentDataset(Segment segment)
           
 
Method Summary
 Object get(CellKey pos)
          Returns the value at a given coordinate.
 double getBytes()
          Returns the number of bytes occupied by this dataset.
 Iterator<Map.Entry<CellKey,Object>> iterator()
           
 void put(CellKey key, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SparseSegmentDataset

SparseSegmentDataset(Segment segment)
Method Detail

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

SourceForge.net_Logo