/// <summary>
        /// Interpolate.
        /// </summary>
        /// <param name="xValues">  the values </param>
        /// <param name="yValues">  the values </param>
        /// <param name="xMatrix">  the matrix </param>
        /// <returns> Values of the underlying cubic spline function at the values of x </returns>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public com.opengamma.strata.collect.array.DoubleMatrix interpolate(final double[] xValues, final double[] yValues, final double[][] xMatrix)
        public virtual DoubleMatrix interpolate(double[] xValues, double[] yValues, double[][] xMatrix)
        {
            ArgChecker.notNull(xMatrix, "xMatrix");

            DoubleMatrix matrix = DoubleMatrix.copyOf(xMatrix);

            return(DoubleMatrix.ofArrayObjects(xMatrix.Length, xMatrix[0].Length, i => interpolate(xValues, yValues, matrix.rowArray(i))));
        }
        /// <summary>
        /// Interpolate.
        /// </summary>
        /// <param name="xValues">  the values </param>
        /// <param name="yValuesMatrix">  the matrix </param>
        /// <param name="x">  the s </param>
        /// <returns> Values of the underlying cubic spline functions interpolating {yValuesMatrix.RowVectors} at the values of x </returns>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: public com.opengamma.strata.collect.array.DoubleMatrix interpolate(final double[] xValues, final double[][] yValuesMatrix, final double[] x)
        public virtual DoubleMatrix interpolate(double[] xValues, double[][] yValuesMatrix, double[] x)
        {
            ArgChecker.notNull(x, "x");

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final com.opengamma.strata.collect.array.DoubleMatrix matrix = com.opengamma.strata.collect.array.DoubleMatrix.copyOf(yValuesMatrix);
            DoubleMatrix matrix = DoubleMatrix.copyOf(yValuesMatrix);

            return(DoubleMatrix.ofArrayObjects(yValuesMatrix.Length, x.Length, i => interpolate(xValues, matrix.rowArray(i), x)));
        }
 //-------------------------------------------------------------------------
 public override DoubleMatrix calculateJacobian(DoubleArray x)
 {
     System.Func <double, DoubleArray> sense = _curve.getYParameterSensitivity(x);
     return(DoubleMatrix.ofArrayObjects(LengthOfRange, LengthOfDomain, i => sense(_samplePoints[i])));
 }