Package dev.nm.analysis.function.rn2r1
Class RealScalarSubFunction
- java.lang.Object
-
- dev.nm.analysis.function.SubFunction<Double>
-
- dev.nm.analysis.function.rn2r1.RealScalarSubFunction
-
- All Implemented Interfaces:
Function<Vector,Double>
,RealScalarFunction
public class RealScalarSubFunction extends SubFunction<Double> implements RealScalarFunction
This constructs aRealScalarFunction
from anotherRealScalarFunction
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
Constructors Constructor Description RealScalarSubFunction(RealScalarFunction f, Map<Integer,Double> fixing)
Construct a scalar sub-function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(double x)
Evaluate the function f at x.Double
evaluate(Vector x)
Evaluate the function f at x, where x is from the domain.-
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 Detail
-
RealScalarSubFunction
public RealScalarSubFunction(RealScalarFunction f, Map<Integer,Double> fixing)
Construct a scalar sub-function.- Parameters:
f
- the unrestricted/original functionfixing
- the values held fixed for a subset of variables
-
-