Package de.gsi.dataset
Interface GridDataSet
-
- All Superinterfaces:
DataSet,EventSource,java.io.Serializable
- All Known Subinterfaces:
DataSet3D,Histogram2D
- All Known Implementing Classes:
AbstractGridDataSet,DoubleGridDataSet,Histogram2,TransposedDataSet.TransposedGridDataSet
public interface GridDataSet extends DataSet
Interface for accessing data on a cartesian grid.- Author:
- Alexander Krimm
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description doubleget(int dimIndex, int... indices)doublegetGrid(int dimIndex, int index)Returns the Grid Value along the specified Grid dimensionintgetGridIndex(int dimIndex, double x)default double[]getGridValues(int dimIndex)default intgetNGrid()int[]getShape()default intgetShape(int dimIndex)-
Methods inherited from interface de.gsi.dataset.DataSet
get, getAxisDescription, getAxisDescriptions, getDataCount, getDataLabel, getDimension, getIndex, getName, getStyle, getStyle, getValue, getValues, lock, recomputeLimits, set, set, setStyle
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Method Detail
-
get
double get(int dimIndex, int... indices)- Parameters:
dimIndex- dimension to retrieveindices- indices to retrieve, missing indices are treated as zero- Returns:
- the value for the given indices
-
getGrid
double getGrid(int dimIndex, int index)Returns the Grid Value along the specified Grid dimension- Parameters:
dimIndex- Dimension Index, smaller than getShape().sizeindex- Index along the specified dimension, smaller than getShape(dimIndex)- Returns:
- the value for the specified index on the grid along the specified dimension
-
getGridIndex
int getGridIndex(int dimIndex, double x)- Parameters:
dimIndex- Dimension index, smaller than getShape().sizex- value along the specified axis to get the next index for- Returns:
- index which corresponds to the given value
-
getGridValues
default double[] getGridValues(int dimIndex)
- Parameters:
dimIndex- Dimension Index, smaller than getShape().size- Returns:
- A double[getShape(dimIndex)] array containing all the grid values along the specified dimension
-
getShape
int[] getShape()
- Returns:
- the shape of the grid of the data, e.g { 3, 4 } for a 3 x 4 matrix.
-
getNGrid
default int getNGrid()
- Returns:
- the number of grid dimensions
-
getShape
default int getShape(int dimIndex)
- Parameters:
dimIndex- the dimension to get the grid shape for- Returns:
- the number of grid points in the given dimension
-
-