public override RrFunction Integral(double basePoint) { var zeroBaseIntegrals = Enumerable.Range(0, abscissae.Length) .Map(i => i == 0 ? 0.0 : values[i - 1] * (abscissae[i] - abscissae[i - 1])) .Scan(0.0, (sum, current) => sum + current); var zeroBasedIntegral = RrFunctions.LinearInterpolation(abscissae, zeroBaseIntegrals, leftValue, values[values.Length - 1]); return(zeroBasedIntegral - zeroBasedIntegral.Eval(basePoint)); }
public override RrFunction Integral(double basePoint) { return(RrFunctions.LinearInterpolation(new[] { basePoint }, new[] { 0.0 }, Value, Value)); }