Esempio n. 1
0
        public static SplineInterpoler BuildLinearSpline(double[] abscissae, double[] values,
                                                         double leftExtrapolationSlope = 0.0, double rightExtrapolationSlope = 0.0)
        {
            var stepSplines = SplineUtils.BuildLinearInterpolation(abscissae, values, leftExtrapolationSlope, rightExtrapolationSlope);

            return(new SplineInterpoler(stepSplines.Map(p => (RationalFraction)p)));
        }
Esempio n. 2
0
        public static SplineInterpoler BuildCubicSpline(double[] abscissae, double[] values,
                                                        double leftDerivative = double.NaN, double rightDerivative = double.NaN)
        {
            var stepSplines = SplineUtils.BuildCubicSpline(abscissae, values, leftDerivative, rightDerivative);

            return(new SplineInterpoler(stepSplines.Map(p => (RationalFraction)p)));
        }