Package dev.nm.analysis.function.rn2r1
Class RealScalarSubFunction
- All Implemented Interfaces:
Function<Vector,
,Double> RealScalarFunction
This constructs a
RealScalarFunction
from another
RealScalarFunction
by restricting/fixing the values of a subset of
variables.-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
Field Summary
Fields inherited from class dev.nm.analysis.function.SubFunction
f, fixing
-
Constructor Summary
ConstructorsConstructorDescriptionRealScalarSubFunction
(RealScalarFunction f, Map<Integer, Double> fixing) Construct a scalar sub-function. -
Method Summary
Methods inherited from class dev.nm.analysis.function.SubFunction
dimensionOfDomain, dimensionOfRange, getAllParts, getVariablePart, isFixedIndex, isFixedIndex
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.nm.analysis.function.Function
dimensionOfDomain, dimensionOfRange
-
Constructor Details
-
RealScalarSubFunction
Construct a scalar sub-function.- Parameters:
f
- the unrestricted/original functionfixing
- the values held fixed for a subset of variables
-
-
Method Details
-
evaluate
Description copied from interface:Function
Evaluate the function f at x, where x is from the domain. -
evaluate
public double evaluate(double x) Evaluate the function f at x.- Parameters:
x
- x- Returns:
- f(x)
-