Class ConstantFunction

    • Constructor Detail

      • ConstantFunction

        public ConstantFunction(double v)
    • Method Detail

      • evaluate

        public double evaluate(double x)
        Description copied from interface: Function
        Evaluates f(x).
        Specified by:
        evaluate in interface  Function
        Parameters:
        x - the input for this function.
        Returns:
        the output of this function.
      • evaluateInverse

        public double[] evaluateInverse(double y)
        Description copied from interface: Function
        Returns all the x-values for the equation f(x) = y.
        Specified by:
        evaluateInverse in interface  Function
        Parameters:
        y - a possible output of this function.
        Returns:
        all the possible inputs that would map to the argument.