R - the range of a functionpublic abstract class SubFunction<R> extends Object implements Function<Vector,R>
Function.EvaluationException| Modifier and Type | Field and Description |
|---|---|
protected Function<Vector,R> |
f
the original, unrestricted function
|
protected Map<Integer,Double> |
fixing
the restrictions or fixed values
|
| Constructor and Description |
|---|
SubFunction(Function<Vector,R> f,
Map<Integer,Double> fixing)
Constructs 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,
Map<Integer,Double> fixing)
Combines the variable and fixed values to form an input to the original
function.
|
static double[] |
getVariablePart(double[] z,
Map<Integer,Double> fixing)
Given an input to the original function, this extracts the variable parts
(excluding the fixed values).
|
boolean |
isFixedIndex(int i)
Checks whether a particular index corresponds a fixed variable/value.
|
static boolean |
isFixedIndex(int i,
Map<Integer,Double> fixing)
Checks whether a particular index corresponds a fixed variable/value.
|
public static boolean isFixedIndex(int i,
Map<Integer,Double> fixing)
i - an index, counting from 1fixing - fixed valuestrue if xi is fixed to some valuepublic static double[] getVariablePart(double[] z,
Map<Integer,Double> fixing)
z - an input to the original functionfixing - fixed valueszpublic static Vector getAllParts(Vector variables, Map<Integer,Double> fixing)
variables - the non-fixed variables/values to the restricted
functionfixing - the fixed values to the original functionpublic 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 valueCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.