public class IdentityFunction extends java.lang.Object implements Function
Constructor and Description |
---|
IdentityFunction()
Defaults to one dimension.
|
IdentityFunction(int dimension,
int i) |
Modifier and Type | Method and Description |
---|---|
Function |
clone() |
int |
getDimension() |
int |
getIdentityDimension() |
float |
map(float[] from) |
float[] |
multiMap(float[][] from) |
void |
setDimension(int dimension) |
void |
setIdentityDimension(int i) |
public IdentityFunction(int dimension, int i)
dimension
- Dimension of input vectori
- Index (from 0) of input vector of which this function is
an identitypublic IdentityFunction()
public int getDimension()
getDimension
in interface Function
Function.getDimension()
public void setDimension(int dimension)
dimension
- New dimension of expected input vectorspublic int getIdentityDimension()
public void setIdentityDimension(int i)
i
- Index (from 0) of input vector of which this function is
an identitypublic float map(float[] from)
map
in interface Function
from
- Must have same length as getDimension()Function.map(float[])
public float[] multiMap(float[][] from)
multiMap
in interface Function
from
- An array of arguments; each element must have length getDimension().Function.multiMap(float[][])