Package de.gsi.dataset.spi
Class TransposedDataSet.TransposedGridDataSet
- java.lang.Object
-
- de.gsi.dataset.spi.TransposedDataSet
-
- de.gsi.dataset.spi.TransposedDataSet.TransposedGridDataSet
-
- All Implemented Interfaces:
DataSet,EventSource,GridDataSet,java.io.Serializable
- Enclosing class:
- TransposedDataSet
public static class TransposedDataSet.TransposedGridDataSet extends TransposedDataSet implements GridDataSet
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.gsi.dataset.spi.TransposedDataSet
TransposedDataSet.TransposedGridDataSet
-
-
Field Summary
-
Fields inherited from class de.gsi.dataset.spi.TransposedDataSet
dataSet, nDims, permutation
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleget(int dimIndex, int... indices)intgetDataCount()Get the number of data points in the data set.doublegetGrid(int dimIndex, int index)Returns the Grid Value along the specified Grid dimensionintgetGridIndex(int dimIndex, double x)intgetIndex(int dimIndex, double... value)Gets the index of the data point closest to the given 'value' coordinate.int[]getShape()doublegetValue(int dimIndex, double... x)Returns the value along the 'dimIndex' axis of a point specified by thexcoordinate.voidsetPermutation(int[] permutation)-
Methods inherited from class de.gsi.dataset.spi.TransposedDataSet
autoNotification, get, getAxisDescription, getAxisDescriptions, getDataLabel, getDimension, getName, getPermutation, getStyle, getStyle, getValues, isTransposed, lock, permute, recomputeLimits, set, setStyle, setTransposed, transpose, transpose, updateEventListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
get, getAxisDescription, getAxisDescriptions, getDataLabel, getDimension, getName, getStyle, getStyle, getValues, lock, recomputeLimits, set, set, setStyle
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
Methods inherited from interface de.gsi.dataset.GridDataSet
getGridValues, getNGrid, getShape
-
-
-
-
Method Detail
-
getDataCount
public int getDataCount()
Description copied from interface:DataSetGet the number of data points in the data set.- Specified by:
getDataCountin interfaceDataSet- Overrides:
getDataCountin classTransposedDataSet- Returns:
- the number of data points
-
setPermutation
public void setPermutation(int[] permutation)
- Overrides:
setPermutationin classTransposedDataSet
-
getIndex
public int getIndex(int dimIndex, double... value)Description copied from interface:DataSetGets the index of the data point closest to the given 'value' coordinate. The index returned may be less then zero or larger the the number of data points in the data set, if the x coordinate lies outside the range of the data set.- Specified by:
getIndexin interfaceDataSet- Overrides:
getIndexin classTransposedDataSet- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')value- the data point coordinates to search for- Returns:
- the index of the data point
-
getShape
public int[] getShape()
- Specified by:
getShapein interfaceGridDataSet- Returns:
- the shape of the grid of the data, e.g { 3, 4 } for a 3 x 4 matrix.
-
getGrid
public double getGrid(int dimIndex, int index)Description copied from interface:GridDataSetReturns the Grid Value along the specified Grid dimension- Specified by:
getGridin interfaceGridDataSet- 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
public int getGridIndex(int dimIndex, double x)- Specified by:
getGridIndexin interfaceGridDataSet- 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
-
get
public double get(int dimIndex, int... indices)- Specified by:
getin interfaceGridDataSet- Parameters:
dimIndex- dimension to retrieveindices- indices to retrieve, missing indices are treated as zero- Returns:
- the value for the given indices
-
getValue
public double getValue(int dimIndex, double... x)Description copied from interface:DataSetReturns the value along the 'dimIndex' axis of a point specified by thexcoordinate.- Specified by:
getValuein interfaceDataSet- Overrides:
getValuein classTransposedDataSet- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')x- horizontal 'dimIndex' coordinate- Returns:
- 'dimIndex' value
-
-