compute method

  1. @override
double compute(
  1. double x
)
override

Returns the y value of the y = f(x) equation.

The function f is built by interpolating the given nodes nodes. The x value is the point at which the function has to be evaluated.

Implementation

@override
double compute(double x) {
  if (forwardDifference) {
    return _forwardEvaluation(forwardDifferenceTable(), x);
  }

  return _backwardEvaluation(backwardDifferenceTable(), x);
}