/// <summary>
        /// PiecewiseCubicHermiteSplineInterpolator is not modified for positive data
        /// </summary>
        public virtual void noModificationTest()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[] xValues = new double[] {1.0, 2.0, 3.0, 4.0, 5.0 };
            double[] xValues = new double[] { 1.0, 2.0, 3.0, 4.0, 5.0 };
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[][] yValues = new double[][] { {0.1, 1.0, 1.0, 20.0, 5.0 }, {1.0, 2.0, 3.0, 0.0, 0.0 } };
            double[][] yValues = new double[][]
            {
                new double[] { 0.1, 1.0, 1.0, 20.0, 5.0 },
                new double[] { 1.0, 2.0, 3.0, 0.0, 0.0 }
            };

            PiecewisePolynomialInterpolator interp = new PiecewiseCubicHermiteSplineInterpolator();
            PiecewisePolynomialResult       result = interp.interpolate(xValues, yValues);

            PiecewisePolynomialInterpolator interpPos = new NonnegativityPreservingCubicSplineInterpolator(interp);
            PiecewisePolynomialResult       resultPos = interpPos.interpolate(xValues, yValues);

            assertEquals(resultPos.Dimensions, result.Dimensions);
            assertEquals(resultPos.NumberOfIntervals, result.NumberOfIntervals);
            assertEquals(resultPos.Order, result.Order);

            for (int i = 1; i < xValues.Length - 1; ++i)
            {
                for (int j = 0; j < 4; ++j)
                {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double ref = result.getCoefMatrix().get(i, j) == 0.0 ? 1.0 : Math.abs(result.getCoefMatrix().get(i, j));
                    double @ref = result.CoefMatrix.get(i, j) == 0.0 ? 1.0 : Math.Abs(result.CoefMatrix.get(i, j));
                    assertEquals(resultPos.CoefMatrix.get(i, j), result.CoefMatrix.get(i, j), @ref * EPS);
                }
            }
        }
        ///
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void dataShortMultiTest()
        public virtual void dataShortMultiTest()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[] xValues = new double[] {1.0, 2.0};
            double[] xValues = new double[] { 1.0, 2.0 };
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[][] yValues = new double[][] { {0.0, 0.1 }, {0.0, 0.1 } };
            double[][] yValues = new double[][]
            {
                new double[] { 0.0, 0.1 },
                new double[] { 0.0, 0.1 }
            };

            PiecewisePolynomialInterpolator interp    = new PiecewiseCubicHermiteSplineInterpolator();
            PiecewisePolynomialInterpolator interpPos = new MonotonicityPreservingCubicSplineInterpolator(interp);

            interpPos.interpolate(xValues, yValues);
        }
        /// <summary>
        /// PiecewiseCubicHermiteSplineInterpolator is not modified except the first 2 and last 2 intervals
        /// </summary>
        public virtual void localMonotonicityDec2Test()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[] xValues = new double[] {-2.0, 3.0, 4.0, 8.0, 9.1, 10.0, 12.0, 14.0 };
            double[] xValues = new double[] { -2.0, 3.0, 4.0, 8.0, 9.1, 10.0, 12.0, 14.0 };
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double[] yValues = new double[] {11.0, 9.5, 2.0, 1.1, -2.2, -2.6, 2.0, 2.0 };
            double[] yValues = new double[] { 11.0, 9.5, 2.0, 1.1, -2.2, -2.6, 2.0, 2.0 };

            PiecewisePolynomialInterpolator interp = new PiecewiseCubicHermiteSplineInterpolator();
            PiecewisePolynomialResult       result = interp.interpolate(xValues, yValues);

            PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();

            PiecewisePolynomialInterpolator interpPos = new MonotonicityPreservingCubicSplineInterpolator(interp);
            PiecewisePolynomialResult       resultPos = interpPos.interpolate(xValues, yValues);

            assertEquals(resultPos.Dimensions, result.Dimensions);
            assertEquals(resultPos.NumberOfIntervals, result.NumberOfIntervals);
            assertEquals(resultPos.Order, result.Order);

            for (int i = 2; i < resultPos.NumberOfIntervals - 2; ++i)
            {
                for (int j = 0; j < 4; ++j)
                {
                    assertEquals(resultPos.CoefMatrix.get(i, j), result.CoefMatrix.get(i, j), EPS);
                }
            }

            const int nKeys = 121;
            double    key0  = -2.0;

            for (int i = 1; i < nKeys; ++i)
            {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final double key = -2.0 + 12.0 / (nKeys - 1) * i;
                double key = -2.0 + 12.0 / (nKeys - 1) * i;
                assertTrue(function.evaluate(resultPos, key).get(0) - function.evaluate(resultPos, key0).get(0) <= 0.0);

                key0 = -2.0 + 11.0 / (nKeys - 1) * i;
            }
        }