new double[][] { {1., -3., 3., -1 }, {0., 5., -20., 20 }, {1., 0., 0., 0. }, {0., 5., -10., 5 }, {1., 3., 3., 1. }, {0., 5., 0., 0. } });
double[] xKeys = new double[] {-2, 1, 2, 2.5 };
final int dim = 2;
final int nCoefs = 4;
PiecewisePolynomialResult pp = new PiecewisePolynomialResult(new DoubleMatrix1D(xValues), coefsMatrix, nCoefs, dim);
PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();
function.integrate(pp, 1., xKeys[0]);
}