Class R1Projection

  • All Implemented Interfaces:
    Function<Vector,​Double>, RealScalarFunction

    public class R1Projection
    extends AbstractRealScalarFunction
    Projection creates a real-valued function RealScalarFunction from a vector-valued function RealVectorFunction by taking only one of its coordinate components in the vector output. For example, suppose we have a \(R^n \rightarrow R^m\) function, \(f_1 = [y_1, y_2, y_3]'\). We construct a \(R^n \rightarrow R\) function by taking its second coordinate. That is, \(f_2 = y_2\).
    • Constructor Detail

      • R1Projection

        public R1Projection​(RealVectorFunction f,
                            int dimension)
        Construct a \(R^n \rightarrow R\) projection from a \(R^n \rightarrow R^m\) function f.
        Parameters:
        f - a vector-valued function
        dimension - the dimension/coordinate of the f value to output
    • Method Detail

      • evaluate

        public Double evaluate​(Vector x)
        Description copied from interface: Function
        Evaluate the function f at x, where x is from the domain.
        Parameters:
        x - x
        Returns:
        f(x)