コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the AkimaSplineInterpolation class.
 /// </summary>
 /// <param name="samplePoints">Sample Points t, sorted ascending.</param>
 /// <param name="sampleValues">Sample Values x(t)</param>
 public AkimaSplineInterpolation(
     IList <double> samplePoints,
     IList <double> sampleValues)
 {
     _spline = new CubicHermiteSplineInterpolation();
     Initialize(samplePoints, sampleValues);
 }
コード例 #2
0
        /// <summary>
        /// Evaluate the spline coefficients as used
        /// internally by this interpolation algorithm.
        /// </summary>
        /// <param name="samplePoints">Sample Points t, sorted ascending.</param>
        /// <param name="sampleValues">Sample Values x(t)</param>
        /// <returns>Spline Coefficient Vector</returns>
        public static double[] EvaluateSplineCoefficients(
            IList <double> samplePoints,
            IList <double> sampleValues)
        {
            double[] derivatives = EvaluateSplineDerivatives(
                samplePoints,
                sampleValues);

            return(CubicHermiteSplineInterpolation.EvaluateSplineCoefficients(
                       samplePoints,
                       sampleValues,
                       derivatives));
        }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the CubicSplineInterpolation class.
        /// </summary>
        /// <param name="samplePoints">Sample Points t, sorted ascending.</param>
        /// <param name="sampleValues">Sample Values x(t)</param>
        /// <param name="leftBoundaryCondition">Condition of the left boundary.</param>
        /// <param name="leftBoundary">Left boundary value. Ignored in the parabolic case.</param>
        /// <param name="rightBoundaryCondition">Condition of the right boundary.</param>
        /// <param name="rightBoundary">Right boundary value. Ignored in the parabolic case.</param>
        public CubicSplineInterpolation(
            IList <double> samplePoints,
            IList <double> sampleValues,
            SplineBoundaryCondition leftBoundaryCondition,
            double leftBoundary,
            SplineBoundaryCondition rightBoundaryCondition,
            double rightBoundary)
        {
            _spline = new CubicHermiteSplineInterpolation();

            Initialize(
                samplePoints,
                sampleValues,
                leftBoundaryCondition,
                leftBoundary,
                rightBoundaryCondition,
                rightBoundary);
        }
コード例 #4
0
        /// <summary>
        /// Evaluate the spline coefficients as used
        /// internally by this interpolation algorithm.
        /// </summary>
        /// <param name="samplePoints">Sample Points t, sorted ascending.</param>
        /// <param name="sampleValues">Sample Values x(t)</param>
        /// <param name="leftBoundaryCondition">Condition of the left boundary.</param>
        /// <param name="leftBoundary">Left boundary value. Ignored in the parabolic case.</param>
        /// <param name="rightBoundaryCondition">Condition of the right boundary.</param>
        /// <param name="rightBoundary">Right boundary value. Ignored in the parabolic case.</param>
        /// <returns>Spline Coefficient Vector</returns>
        public static double[] EvaluateSplineCoefficients(
            IList <double> samplePoints,
            IList <double> sampleValues,
            SplineBoundaryCondition leftBoundaryCondition,
            double leftBoundary,
            SplineBoundaryCondition rightBoundaryCondition,
            double rightBoundary)
        {
            double[] derivatives = EvaluateSplineDerivatives(
                samplePoints,
                sampleValues,
                leftBoundaryCondition,
                leftBoundary,
                rightBoundaryCondition,
                rightBoundary);

            return(CubicHermiteSplineInterpolation.EvaluateSplineCoefficients(
                       samplePoints,
                       sampleValues,
                       derivatives));
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the CubicSplineInterpolation class.
 /// </summary>
 public CubicSplineInterpolation()
 {
     _spline = new CubicHermiteSplineInterpolation();
 }