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,DataSetError,DataSetMetaData,EventSource,TestDataSet<D>
- Direct Known Subclasses:
CosineFunction,GaussFunction,RandomStepFunction,RandomWalkFunction,SincFunction,SineFunction,SingleOutlierFunction
public abstract class AbstractTestFunction<D extends AbstractTestFunction<D>> extends AbstractErrorDataSet<D> implements TestDataSet<D>
abstract error data set for graphical testing purposes- Author:
- rstein
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.gsi.dataset.DataSetError
DataSetError.ErrorType
-
-
Field Summary
-
Fields inherited from class de.gsi.dataset.spi.AbstractDataSet
dataLabels, dataStyles, editConstraints, lock, metaInfoMap, name, updateListeners, xRange, yRange
-
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 setintgetDataCount()Get the number of data points in the data setDataSetError.ErrorTypegetErrorType()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 idoublegetXErrorNegative(int index)Returns the negative error along the X axis of a point specified by theindex.doublegetXErrorPositive(int index)Returns the positive error along the X axis of a point specified by theindex.doublegetY(int index)Gets the y value of the data point with the index idoublegetYErrorNegative(int index)Returns the negative error along the Y axis of a point specified by theindex.doublegetYErrorPositive(int index)Returns the positive error along the Y axis of a point specified by theindex.Dupdate()generate a new set of numbers-
Methods inherited from class de.gsi.dataset.spi.AbstractErrorDataSet
computeLimits, fireInvalidated, getThis, lock, setErrorType, unlock
-
Methods inherited from class de.gsi.dataset.spi.AbstractDataSet
addDataLabel, addDataStyle, binarySearchX, binarySearchY, getDataCount, getDataLabel, getDefaultDataLabel, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getName, getUndefValue, getWarningList, getXIndex, getXMax, getXMin, getXRange, getYIndex, getYMax, getYMin, getYRange, isAutoNotification, minNeigbourSearchX, removeDataLabel, removeStyle, setAutoNotifaction, setEditConstraints, setName, toString, updateEventListener
-
Methods inherited from class de.gsi.dataset.spi.AbstractStylable
getStyle, setStyle
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.DataSet
getDataCount, getDataLabel, getName, getStyle, getUndefValue, getValue, getXIndex, getXMax, getXMin, getXValues, getYIndex, getYMax, getYMin, getYValues, isAutoNotification, lock, setAutoNotifaction, setStyle, unlock
-
Methods inherited from interface de.gsi.dataset.DataSetError
getXErrorNegative, getXErrorPositive, getXErrorsNegative, getXErrorsPositive, getYErrorNegative, getYErrorPositive, getYErrorsNegative, getYErrorsPositive
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, invokeListener, invokeListener, removeListener, updateEventListener
-
Methods inherited from interface de.gsi.dataset.testdata.TestDataSet
fireInvalidated, generateY
-
-
-
-
Method Detail
-
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)
-
getDataCount
public int getDataCount()
Description copied from interface:DataSetGet the number of data points in the data set- Specified by:
getDataCountin interfaceDataSet- Returns:
- the number of data points
-
getX
public double getX(int index)
Description copied from interface:DataSetGets the x value of the data point with the index i
-
getY
public double getY(int index)
Description copied from interface:DataSetGets the y value of the data point with the index i
-
getXErrorNegative
public double getXErrorNegative(int index)
Description copied from interface:DataSetErrorReturns the negative error along the X axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getXErrorNegativein interfaceDataSetError- Parameters:
index- of negative X error to be returned.- Returns:
- negative X error
-
getXErrorPositive
public double getXErrorPositive(int index)
Description copied from interface:DataSetErrorReturns the positive error along the X axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getXErrorPositivein interfaceDataSetError- Parameters:
index- of positive X error to be returned.- Returns:
- positive X error
-
getYErrorNegative
public double getYErrorNegative(int index)
Description copied from interface:DataSetErrorReturns the negative error along the Y axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getYErrorNegativein interfaceDataSetError- Parameters:
index- of negative Y error to be returned.- Returns:
- negative Y error
-
getYErrorPositive
public double getYErrorPositive(int index)
Description copied from interface:DataSetErrorReturns the positive error along the Y axis of a point specified by theindex. Please note that errors are assumed to be always positive!- Specified by:
getYErrorPositivein interfaceDataSetError- Parameters:
index- of positive Y error to be returned.- Returns:
- positive Y error
-
getErrorType
public DataSetError.ErrorType getErrorType()
Description copied from class:AbstractErrorDataSetreturn the DataSetError.ErrorType of the dataset- Specified by:
getErrorTypein interfaceDataSetError- Overrides:
getErrorTypein classAbstractErrorDataSet<D extends AbstractTestFunction<D>>- Returns:
- one of the error types specified in ErrorType
- See Also:
for details
-
getStyle
public 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)
-
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
-
-