public class PiecewiseConstantFunction extends AbstractFunction
DIMENSION_PROPERTY
Constructor and Description |
---|
PiecewiseConstantFunction(float[] discontinuities,
float[] values) |
PiecewiseConstantFunction(float[] discontinuities,
float[] values,
int dimension)
A version of the constructor that allows you to specify the dimension (this doesn't do anything since
this function makes no use of its input, but it allows these functions to be attached to multidimensional ensembles).
|
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
Configuration |
getConfiguration() |
float[] |
getDiscontinuities() |
int |
getNumDiscontinuities() |
float[] |
getValues() |
float |
map(float[] from) |
void |
setDiscontinuities(float[] discontinuities) |
void |
setNumDiscontinuities(int num) |
void |
setValues(float[] values) |
getCode, getDimension, getName, multiMap, setCode, setName
public PiecewiseConstantFunction(float[] discontinuities, float[] values)
discontinuities
- Ordered points x at which the function is y = f(x) is discontinuousvalues
- Values y below x1 and above x1..xnpublic PiecewiseConstantFunction(float[] discontinuities, float[] values, int dimension)
discontinuities
- Ordered points x at which the function is y = f(x) is discontinuousvalues
- Values y below x1 and above x1..xnpublic Configuration getConfiguration()
public int getNumDiscontinuities()
public void setNumDiscontinuities(int num)
num
- New number of discontinuitiespublic float[] getDiscontinuities()
public void setDiscontinuities(float[] discontinuities)
discontinuities
- Ordered points x at which the function is y = f(x) is discontinuouspublic float[] getValues()
public void setValues(float[] values)
values
- Values y below x1 and above x1..xnpublic float map(float[] from)
map
in interface Function
map
in class AbstractFunction
from
- Must have same length as getDimension()Function.map(float[])
public Function clone() throws java.lang.CloneNotSupportedException
clone
in interface Function
clone
in class AbstractFunction
java.lang.CloneNotSupportedException
- is super does not support clone