Package de.gsi.dataset.testdata.spi
Class AbstractTestFunction<D extends AbstractTestFunction<D>>
- java.lang.Object
-
- de.gsi.dataset.spi.AbstractStylable<D>
-
- de.gsi.dataset.spi.AbstractDataSet<D>
-
- de.gsi.dataset.spi.AbstractErrorDataSet<D>
-
- de.gsi.dataset.testdata.spi.AbstractTestFunction<D>
-
- Type Parameters:
D- generics for fluent design
- All Implemented Interfaces:
DataSet,DataSet2D,DataSetError,DataSetMetaData,EventSource,TestDataSet<D>,java.io.Serializable
- Direct Known Subclasses:
CosineFunction,GaussFunction,RandomStepFunction,RandomWalkFunction,SincFunction,SineFunction,SingleOutlierFunction
public abstract class AbstractTestFunction<D extends AbstractTestFunction<D>> extends AbstractErrorDataSet<D> implements DataSet2D, TestDataSet<D>
abstract error data set for graphical testing purposes- Author:
- rstein
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.gsi.dataset.DataSetError
DataSetError.ErrorType
-
-
Field Summary
-
Fields inherited from interface de.gsi.dataset.DataSetMetaData
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT
-
-
Constructor Summary
Constructors Constructor Description AbstractTestFunction(java.lang.String name, int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]generateX(int count)generate test data setdoubleget(int dimIndex, int index)Gets the x value of the data point with the index iintgetDataCount()Get the number of data points in the data set.doublegetErrorNegative(int dimIndex, int index)Returns the negative error along the 'dimIndex' axis of a point specified by theindex.doublegetErrorPositive(int dimIndex, int index)Returns the positive error along the 'dimIndex' axis of a point specified by theindex.DataSetError.ErrorTypegetErrorType(int dimIndex)return the DataSetError.ErrorType of the datasetjava.lang.StringgetStyle(int index)A string representation of the CSS style associated with this specificDataSetdata point.doublegetX(int index)Gets the x value of the data point with the index idoublegetY(int index)Gets the y value of the data point with the index iDupdate()generate a new set of numbers-
Methods inherited from class de.gsi.dataset.spi.AbstractErrorDataSet
fireInvalidated, getThis, lock, recomputeLimits, setErrorType
-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getWarningList, hashCode, minNeigbourSearchX, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class de.gsi.dataset.spi.AbstractStylable
getStyle, setStyle
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getAxisDescription, getAxisDescriptions, getDataLabel, getIndex, getName, getStyle, getValues, lock, recomputeLimits, setStyle
-
Methods inherited from interface de.gsi.dataset.DataSet2D
getDataCount, getDimension, getValue, getValue, getXIndex, getXValues, getYIndex, getYValues
-
Methods inherited from interface de.gsi.dataset.DataSetError
getErrorNegative, getErrorPositive, getErrorsNegative, getErrorsPositive
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
Methods inherited from interface de.gsi.dataset.testdata.TestDataSet
fireInvalidated, generateY
-
-
-
-
Method Detail
-
generateX
public double[] generateX(int count)
Description copied from interface:TestDataSetgenerate test data set- Specified by:
generateXin interfaceTestDataSet<D extends AbstractTestFunction<D>>- Parameters:
count- number of bins- Returns:
- the generated array
-
get
public double get(int dimIndex, int index)Description copied from interface:DataSetGets the x value of the data point with the index i
-
getDataCount
public int getDataCount()
Description copied from interface:DataSet2DGet the number of data points in the data set.- Specified by:
getDataCountin interfaceDataSet- Specified by:
getDataCountin interfaceDataSet2D- Returns:
- the number of data points
-
getErrorNegative
public final double getErrorNegative(int dimIndex, int index)Description copied from interface:DataSetErrorReturns the negative error along the 'dimIndex' axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getErrorNegativein interfaceDataSetError- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')index- of negative 'dimIndex' error to be returned.- Returns:
- negative 'dimIndex' error
-
getErrorPositive
public final double getErrorPositive(int dimIndex, int index)Description copied from interface:DataSetErrorReturns the positive error along the 'dimIndex' axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getErrorPositivein interfaceDataSetError- Parameters:
dimIndex- the dimension index (ie. '0' equals 'X', '1' equals 'Y')index- of positive 'dimIndex' error to be returned.- Returns:
- positive 'dimIndex' error
-
getErrorType
public DataSetError.ErrorType getErrorType(int dimIndex)
Description copied from class:AbstractErrorDataSetreturn the DataSetError.ErrorType of the dataset- Specified by:
getErrorTypein interfaceDataSetError- Overrides:
getErrorTypein classAbstractErrorDataSet<D extends AbstractTestFunction<D>>- Parameters:
dimIndex- the dimension for which to query the ErrorType- Returns:
- one of the error types specified in ErrorType
- See Also:
for details
-
getStyle
public final java.lang.String getStyle(int index)
Description copied from class:AbstractDataSetA string representation of the CSS style associated with this specificDataSetdata point. @see #getStyle()- Specified by:
getStylein interfaceDataSet- Overrides:
getStylein classAbstractDataSet<D extends AbstractTestFunction<D>>- Parameters:
index- the index of the specific data point- Returns:
- user-specific data set style description (ie. may be set by user)
-
getX
public double getX(int index)
Description copied from interface:DataSet2DGets the x value of the data point with the index i
-
getY
public double getY(int index)
Description copied from interface:DataSet2DGets the y value of the data point with the index i
-
update
public D update()
Description copied from interface:TestDataSetgenerate a new set of numbers- Specified by:
updatein interfaceTestDataSet<D extends AbstractTestFunction<D>>- Returns:
- itself (fluent design)
-
-