R - the range of a functionpublic abstract class SubFunction<R> extends java.lang.Object implements Function<Vector,R>
Function.EvaluationException| Modifier and Type | Field and Description |
|---|---|
protected Function<Vector,R> |
f
the original, unrestricted function
|
protected java.util.Map<java.lang.Integer,java.lang.Double> |
fixing
the restrictions or fixed values
|
| Constructor and Description |
|---|
SubFunction(Function<Vector,R> f,
java.util.Map<java.lang.Integer,java.lang.Double> fixing)
Construct a sub-function.
|
| Modifier and Type | Method and Description |
|---|---|
int |
dimensionOfDomain()
Get the number of variables the function has.
|
int |
dimensionOfRange()
Get the dimension of the range space of the function.
|
static Vector |
getAllParts(Vector variables,
java.util.Map<java.lang.Integer,java.lang.Double> fixed)
Combine the variable and fixed values to form an input to the original function.
|
double[] |
getVariablePart(double[] z)
Given an input to the original function, this extracts the variable parts (excluding the fixed values).
|
boolean |
isFixedIndex(int i)
Check whether a particular index corresponds a fixed variable/value.
|
protected final java.util.Map<java.lang.Integer,java.lang.Double> fixing
public int dimensionOfDomain()
FunctiondimensionOfDomain in interface Function<Vector,R>public int dimensionOfRange()
FunctiondimensionOfRange in interface Function<Vector,R>public boolean isFixedIndex(int i)
i - an index, counting from 1true if xi is fixed to some valuepublic double[] getVariablePart(double[] z)
z - an input to the original functionzpublic static Vector getAllParts(Vector variables, java.util.Map<java.lang.Integer,java.lang.Double> fixed)
variables - the non-fixed variables/values to the restricted functionfixed - the fixed values to the original function