com.espertech.esper.view.stat.olap
Interface Cube

All Known Implementing Classes:
CubeImpl

public interface Cube

Interface for querying multidimensional data. Dimension presents information about the dimensionality of the data. Cells are Cell instances. The identification of cell in the cube occurs by member values for each dimension.


Method Summary
 Dimension[] getDimensions()
          Returns dimensions.
 Cell[] getMeasures()
          Returns all measures.
 DimensionMember[] getMembers(int ordinal)
          Returns the member value for each dimension that intersect to identify the cell of the given ordinal.
 int getOrdinal(DimensionMember[] members)
          Given the the members of each dimension that define the intersection, returns the ordinal of a measure.
 

Method Detail

getMeasures

Cell[] getMeasures()
Returns all measures. Individual measures can be retrieved directly by indexing into the array of measures. A formual for calculating an ordinal for a 3-dimensional cube is as follows: ordinal = dimension[0].index + dimension[1].index * dimension[0].size + dimension[2].index * dimension[0].size * dimension[1].size;

Returns:
array of measures

getDimensions

Dimension[] getDimensions()
Returns dimensions. Implementations have at least 1 dimension and can be n-dimensional.

Returns:
dimension array

getOrdinal

int getOrdinal(DimensionMember[] members)
Given the the members of each dimension that define the intersection, returns the ordinal of a measure.

Parameters:
members - is an array of members within each dimension that intersect and thus define the cell position
Returns:
ordinal starts at zero and ends at Cell[].length - 1. A -1 is returned if the intersection could not be determined, such as when a dimension member could not be located.

getMembers

DimensionMember[] getMembers(int ordinal)
Returns the member value for each dimension that intersect to identify the cell of the given ordinal.

Parameters:
ordinal - is the cell ordinal, starting at zero and with a max value of Cell[].length - 1.
Returns:
member values matching the number of dimensions that intersect to identify the cell

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com