Package de.gsi.dataset
Interface DataSet
-
- All Superinterfaces:
EventSource,java.io.Serializable
- All Known Subinterfaces:
CategoryHistogram,DataSet2D,DataSet3D,DataSetError,EditableDataSet,Histogram,Histogram1D,TestDataSet<D>
- All Known Implementing Classes:
AbstractDataSet,AbstractDataSet3D,AbstractErrorDataSet,AbstractHistogram,AbstractStylable,AbstractTestFunction,AveragingDataSet,CircularDoubleErrorDataSet,CosineFunction,DefaultDataSet,DefaultErrorDataSet,DimReductionDataSet,DoubleDataSet,DoubleDataSet3D,DoubleErrorDataSet,FifoDoubleErrorDataSet,FloatDataSet,FragmentedDataSet,GaussFunction,Histogram,Histogram2,LabelledMarkerDataSet,LimitedIndexedTreeDataSet,ListDataSet,ListErrorDataSet,MultiDimDoubleDataSet,RandomStepFunction,RandomWalkFunction,RollingDataSet,SincFunction,SineFunction,SingleOutlierFunction,TransposedDataSet,TransposedDataSet.TransposedDataSet3D,TriangleFunction,WrappedDataSet
public interface DataSet extends EventSource, java.io.Serializable
Basic interface for observable data sets.- Author:
- original from an unknown author at CERN (JDataViewer), braeun, rstein
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description doubleget(int dimIndex, int index)Gets the x value of the data point with the index idefault AxisDescriptiongetAxisDescription(int dim)Return the axis description of the i-th axis.java.util.List<AxisDescription>getAxisDescriptions()default intgetDataCount()Get the number of data points in the data set.intgetDataCount(int dimIndex)Get the number of data points in the data set for a specific dimension.java.lang.StringgetDataLabel(int index)Returns label of a data point specified by the index.intgetDimension()intgetIndex(int dimIndex, double value)Gets the index of the data point closest to the given 'value' coordinate.java.lang.StringgetName()Gets the name of the data set.java.lang.StringgetStyle()A string representation of the CSS style associated with this specificDataSet.java.lang.StringgetStyle(int index)A string representation of the CSS style associated with this specificDataSetdata point.doublegetValue(int dimIndex, double x)Gets the interpolated y value of the data point for given x coordinatedefault double[]getValues(int dimIndex)<D extends DataSet>
DataSetLock<D>lock()DataSetrecomputeLimits(int dimension)DataSetsetStyle(java.lang.String style)A string representation of the CSS style associated with this specificDataSet.-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
-
-
-
Field Detail
-
DIM_X
static final int DIM_X
- See Also:
- Constant Field Values
-
DIM_Y
static final int DIM_Y
- See Also:
- Constant Field Values
-
DIM_Z
static final int DIM_Z
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
double get(int dimIndex, int index)Gets the x value of the data point with the index i- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')index- data point index- Returns:
- the x value
-
getAxisDescription
default AxisDescription getAxisDescription(int dim)
Return the axis description of the i-th axis.- Parameters:
dim- 0: X-Axis, 1: Y-Axis, ...- Returns:
- Axis Label
-
getAxisDescriptions
java.util.List<AxisDescription> getAxisDescriptions()
- Returns:
- axis descriptions of the primary and secondary axes
-
getDataCount
default int getDataCount()
Get the number of data points in the data set. The default implementation is the number of points in the highest dimension.- Returns:
- the number of data points
-
getDataCount
int getDataCount(int dimIndex)
Get the number of data points in the data set for a specific dimension.- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')- Returns:
- the number of data points
-
getDataLabel
java.lang.String getDataLabel(int index)
Returns label of a data point specified by the index. The label can be used as a category name if CategoryStepsDefinition is used or for annotations displayed for data points.- Parameters:
index- the data index- Returns:
- label of a data point specified by the index or
nullif none label has been specified for this data point.
-
getDimension
int getDimension()
- Returns:
- number of dimensions
-
getIndex
int getIndex(int dimIndex, double value)Gets 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.- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')value- the data point coordinate to search for- Returns:
- the index of the data point
-
getName
java.lang.String getName()
Gets the name of the data set.- Returns:
- the name of the DataSet
-
getStyle
java.lang.String getStyle()
A string representation of the CSS style associated with this specificDataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Returns:
- user-specific data set style description (ie. may be set by user)
-
getStyle
java.lang.String getStyle(int index)
A string representation of the CSS style associated with this specificDataSetdata point. @see #getStyle()- Parameters:
index- the specific data point index- Returns:
- user-specific data set style description (ie. may be set by user)
-
getValue
double getValue(int dimIndex, double x)Gets the interpolated y value of the data point for given x coordinate- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')x- the new x coordinate- Returns:
- the y value
-
getValues
default double[] getValues(int dimIndex)
- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')- Returns:
- the x value array
-
lock
<D extends DataSet> DataSetLock<D> lock()
- Type Parameters:
D- generics (fluent design)- Returns:
- Read-Write Lock to guard the DataSet
- See Also:
DataSetLock
-
recomputeLimits
DataSet recomputeLimits(int dimension)
-
setStyle
DataSet setStyle(java.lang.String style)
A string representation of the CSS style associated with this specificDataSet. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.- Parameters:
style- the new user-specific style- Returns:
- itself (fluent interface)
-
-