예제 #1
0
 /// <summary>
 /// Construct the interpolator without clamped points. </summary>
 /// <param name="baseMethod"> The base interpolator must not be itself </param>
 public ProductPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod)
 {
     ArgChecker.notNull(baseMethod, "baseMethod");
     ArgChecker.isFalse(baseMethod is ProductPiecewisePolynomialInterpolator, "baseMethod should not be ProductPiecewisePolynomialInterpolator");
     _baseMethod     = baseMethod;
     _xValuesClamped = null;
     _yValuesClamped = null;
     _isClamped      = false;
 }
        /// <summary>
        /// Construct the interpolator with clamped points.
        /// </summary>
        /// <param name="baseMethod"> The base interpolator must be not be itself </param>
        /// <param name="xValuesClamped"> X values of the clamped points </param>
        /// <param name="yValuesClamped"> Y values of the clamped points </param>
        public ClampedPiecewisePolynomialInterpolator(PiecewisePolynomialInterpolator baseMethod, double[] xValuesClamped, double[] yValuesClamped)
        {
            ArgChecker.notNull(baseMethod, "method");
            ArgChecker.notEmpty(xValuesClamped, "xValuesClamped");
            ArgChecker.notEmpty(yValuesClamped, "yValuesClamped");
            ArgChecker.isFalse(baseMethod is ProductPiecewisePolynomialInterpolator, "baseMethod should not be ProductPiecewisePolynomialInterpolator");
            int nExtraPoints = xValuesClamped.Length;

            ArgChecker.isTrue(yValuesClamped.Length == nExtraPoints, "xValuesClamped and yValuesClamped should be the same length");
            _baseMethod     = baseMethod;
            _xValuesClamped = Arrays.copyOf(xValuesClamped, nExtraPoints);
            _yValuesClamped = Arrays.copyOf(yValuesClamped, nExtraPoints);
        }
예제 #3
0
        /// <summary>
        /// Constructor using the same interpolation method for x0 and x1. </summary>
        /// <param name="method"> <seealso cref="PiecewisePolynomialInterpolator"/> </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public BicubicSplineInterpolator(final PiecewisePolynomialInterpolator method)
        public BicubicSplineInterpolator(PiecewisePolynomialInterpolator method)
        {
            _method = new PiecewisePolynomialInterpolator[] { method, method };
        }
        /// <summary>
        /// Primary interpolation method should be passed. </summary>
        /// <param name="method"> PiecewisePolynomialInterpolator </param>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public NonnegativityPreservingCubicSplineInterpolator(final PiecewisePolynomialInterpolator method)
        public NonnegativityPreservingCubicSplineInterpolator(PiecewisePolynomialInterpolator method)
        {
            _method = method;
        }