Package mondrian.rolap.agg
Class DenseDoubleSegmentDataset
- java.lang.Object
-
- mondrian.rolap.agg.DenseSegmentDataset
-
- mondrian.rolap.agg.DenseNativeSegmentDataset
-
- mondrian.rolap.agg.DenseDoubleSegmentDataset
-
- All Implemented Interfaces:
Iterable<Map.Entry<CellKey,Object>>,SegmentDataset
class DenseDoubleSegmentDataset extends DenseNativeSegmentDataset
Implementation ofDenseSegmentDatasetthat stores values of typedouble.- Author:
- jhyde
-
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]values-
Fields inherited from class mondrian.rolap.agg.DenseNativeSegmentDataset
nullValues
-
Fields inherited from class mondrian.rolap.agg.DenseSegmentDataset
axisMultipliers
-
-
Constructor Summary
Constructors Constructor Description DenseDoubleSegmentDataset(SegmentAxis[] axes, double[] values, BitSet nullIndicators)Creates a populated DenseDoubleSegmentDataset.DenseDoubleSegmentDataset(SegmentAxis[] axes, int size)Creates a DenseDoubleSegmentDataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentBodycreateSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)Return an immutable, final and serializable implementation of a SegmentBody in order to cache this dataset.booleanexists(CellKey pos)Returns whether there is a value at a given coordinate.doublegetDouble(CellKey key)Returns the value at a given coordinate, as adouble.DoublegetObject(int offset)ObjectgetObject(CellKey pos)Returns the value at a given coordinate, as anObject.protected intgetSize()SqlStatement.TypegetType()Returns the SQL type of the data contained in this dataset.voidpopulateFrom(int[] pos, SegmentDataset data, CellKey key)voidpopulateFrom(int[] pos, SegmentLoader.RowList rowList, int column)Sets the value a given ordinal.(package private) voidset(int k, double d)-
Methods inherited from class mondrian.rolap.agg.DenseNativeSegmentDataset
isNull, isNull
-
Methods inherited from class mondrian.rolap.agg.DenseSegmentDataset
getBytes, getInt, getOffset, getOffset, iterator
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DenseDoubleSegmentDataset
DenseDoubleSegmentDataset(SegmentAxis[] axes, int size)
Creates a DenseDoubleSegmentDataset.- Parameters:
axes- Segment axes, containing actual column valuessize- Number of coordinates
-
DenseDoubleSegmentDataset
DenseDoubleSegmentDataset(SegmentAxis[] axes, double[] values, BitSet nullIndicators)
Creates a populated DenseDoubleSegmentDataset.- Parameters:
axes- Segment axes, containing actual column valuesvalues- Cell values; not copiednullIndicators- Null indicators
-
-
Method Detail
-
getDouble
public double getDouble(CellKey key)
Description copied from interface:SegmentDatasetReturns the value at a given coordinate, as adouble.- Specified by:
getDoublein interfaceSegmentDataset- Overrides:
getDoublein classDenseSegmentDataset- Parameters:
key- Coordinate position- Returns:
- Value
-
getObject
public Object getObject(CellKey pos)
Description copied from interface:SegmentDatasetReturns the value at a given coordinate, as anObject.- Specified by:
getObjectin interfaceSegmentDataset- Overrides:
getObjectin classDenseSegmentDataset- Parameters:
pos- Coordinate position- Returns:
- Value
-
getObject
public Double getObject(int offset)
- Specified by:
getObjectin classDenseSegmentDataset
-
exists
public boolean exists(CellKey pos)
Description copied from interface:SegmentDatasetReturns whether there is a value at a given coordinate.- Parameters:
pos- Coordinate position- Returns:
- Whether there is a value
-
populateFrom
public void populateFrom(int[] pos, SegmentDataset data, CellKey key)
-
populateFrom
public void populateFrom(int[] pos, SegmentLoader.RowList rowList, int column)Description copied from interface:SegmentDatasetSets the value a given ordinal.- Parameters:
pos- OrdinalrowList- Row listcolumn- Column of row list
-
getType
public SqlStatement.Type getType()
Description copied from interface:SegmentDatasetReturns the SQL type of the data contained in this dataset.- Returns:
- A value of SqlStatement.Type
-
set
void set(int k, double d)
-
getSize
protected int getSize()
- Specified by:
getSizein classDenseSegmentDataset
-
createSegmentBody
public SegmentBody createSegmentBody(List<Pair<SortedSet<Comparable>,Boolean>> axes)
Description copied from interface:SegmentDatasetReturn an immutable, final and serializable implementation of a SegmentBody in order to cache this dataset.- Parameters:
axes- An array with, for each axis, the set of axis values, sorted in natural order, and a flag saying whether the null value is also present. This is supplied by theSegmentLoader.- Returns:
- A
SegmentBody.
-
-