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 a RealScalarFunction from another RealScalarFunction by restricting/fixing the values of a subset of variables.
  • Constructor Details

    • RealScalarSubFunction

      public RealScalarSubFunction(RealScalarFunction f, Map<Integer,Double> fixing)
      Construct a scalar sub-function.
      Parameters:
      f - the unrestricted/original function
      fixing - the values held fixed for a subset of variables
  • Method Details

    • evaluate

      public Double evaluate(Vector x)
      Description copied from interface: Function
      Evaluate the function f at x, where x is from the domain.
      Specified by:
      evaluate in interface Function<Vector,Double>
      Parameters:
      x - x
      Returns:
      f(x)
    • evaluate

      public double evaluate(double x)
      Evaluate the function f at x.
      Parameters:
      x - x
      Returns:
      f(x)