Package de.gsi.dataset
Interface DataSet2D
-
- All Superinterfaces:
DataSet,EventSource,java.io.Serializable
- All Known Subinterfaces:
TestDataSet<D>
- All Known Implementing Classes:
AbstractTestFunction,CircularDoubleErrorDataSet,CosineFunction,DefaultDataSet,DefaultErrorDataSet,DimReductionDataSet,DoubleDataSet,DoubleErrorDataSet,FifoDoubleErrorDataSet,FloatDataSet,FragmentedDataSet,GaussFunction,Histogram,LabelledMarkerDataSet,RandomStepFunction,RandomWalkFunction,RollingDataSet,SincFunction,SineFunction,SingleOutlierFunction,TriangleFunction
public interface DataSet2D extends DataSet
Basic interface for two-dimensional observable data sets.- Author:
- original from an unknown author at CERN (JDataViewer), braeun, rstein
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default intgetDimension()default doublegetValue(double x)Gets the interpolated y value of the data point for given x coordinatedefault doublegetX(int index)Gets the x value of the data point with the index idefault intgetXIndex(double x)Gets the index of the data point closest to the given x coordinate.default double[]getXValues()default doublegetY(int index)Gets the y value of the data point with the index idefault intgetYIndex(double y)Gets the first index of the data point closest to the given y coordinate.default double[]getYValues()-
Methods inherited from interface de.gsi.dataset.DataSet
get, getAxisDescription, getAxisDescriptions, getDataCount, getDataLabel, 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
-
getDimension
default int getDimension()
- Specified by:
getDimensionin interfaceDataSet- Returns:
- number of dimensions
-
getValue
default double getValue(double x)
Gets the interpolated y value of the data point for given x coordinate- Parameters:
x- the new x coordinate- Returns:
- the y value
-
getX
default double getX(int index)
Gets the x value of the data point with the index i- Parameters:
index- the data point index- Returns:
- the x value
-
getXIndex
default int getXIndex(double x)
Gets the index of the data point closest to the given x coordinate. If the x coordinate lies outside the range of the data set, the index of the first/last point is returned.- Parameters:
x- the x position of the data point- Returns:
- the index of the data point
-
getXValues
default double[] getXValues()
- Returns:
- the x value array
-
getY
default double getY(int index)
Gets the y value of the data point with the index i- Parameters:
index- the data point index- Returns:
- the y value
-
getYIndex
default int getYIndex(double y)
Gets the first index of the data point closest to the given y coordinate. If the y coordinate lies outside the range of the data set, the index of the first/last point is returned.- Parameters:
y- the y position of the data point- Returns:
- the index of the data point
-
getYValues
default double[] getYValues()
- Returns:
- the x value array
-
-