public abstract class IlvFunctionDataSet extends IlvAbstractDataSet
[xMin,xMax]
.y=f(x)
, implemented by the
callFunction(double)
abstract method.dataCount
discrete values.
The coordinates of the ith data point are as follows:
x = (xMax-xMin)/(dataCount-1)*i + xMin y = f(x)
DEFAULT_UNDEF_VALUE
Constructor and Description |
---|
IlvFunctionDataSet(double xMin,
double xMax,
int dataCount)
Creates a new function data set with the specified definition domain.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
callFunction(double val)
Calls the function for the specified value.
|
protected void |
computeLimits(IlvDataInterval xRange,
IlvDataInterval yRange)
Computes the limits of the values stored in this data set.
|
int |
getDataCount()
Returns the number of data points held by this data set.
|
double |
getMinimumXDifference()
Returns the minimum positive difference among adjacent X values in the
sequence of X values, sorted into ascending order.
|
double |
getXData(int idx)
Returns the X-value of the data point at the specified index.
|
double |
getYData(int idx)
Returns the Y-value of the data point at the specified index.
|
boolean |
isXValuesSorted()
Indicates whether the X values of the data points managed by
this data set are sorted into increasing order.
|
void |
setDefinition(double xMin,
double xMax,
int dataCount)
Sets the definition domain of the function.
|
addData, addDataSetListener, computeMinimumXDifference, dataAdded, dataChanged, endBatch, fireDataAddedEvent, fireDataChangedEvent, fireDataSetContentsEvent, fireDataSetPropertyEvent, getData, getDataBetween, getDataInside, getDataInside, getDataLabel, getName, getProperty, getUndefValue, getXRange, getXRange, getYRange, getYRange, invalidateLimits, invalidateLimits, invalidateLimits, isBatched, isEditable, isXRangeIncludingUndefinedPoints, putProperty, removeDataSetListener, setData, setLimitsValid, setName, setUndefValue, setXRangeIncludingUndefinedPoints, startBatch, toString
public IlvFunctionDataSet(double xMin, double xMax, int dataCount)
setDefinition(double, double, int)
public int getDataCount()
getDataCount
in interface IlvDataSet
getDataCount
in class IlvAbstractDataSet
public void setDefinition(double xMin, double xMax, int dataCount)
public double getXData(int idx)
getXData
in interface IlvDataSet
getXData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public double getYData(int idx)
getYData
in interface IlvDataSet
getYData
in class IlvAbstractDataSet
idx
- a data point index, >= 0, < getDataCount()
public boolean isXValuesSorted()
true
.isXValuesSorted
in interface IlvDataSet
isXValuesSorted
in class IlvAbstractDataSet
public double getMinimumXDifference()
Note: This method may be slow, depending on the other characteristics of
this data set. If you want to provide this information, instead of having
it computed each time it is needed, you can do so by calling
IlvDataSetProperty.setCategory(IlvDataSet, Double)
.
getMinimumXDifference
in class IlvAbstractDataSet
public abstract double callFunction(double val)
protected void computeLimits(IlvDataInterval xRange, IlvDataInterval yRange)
computeLimits
in class IlvAbstractDataSet
xRange
- Returns the definition domain of the function.yRange
- Returns the Y values range.IlvAbstractDataSet.isXRangeIncludingUndefinedPoints()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.