Examples of PiecewisePolynomialResult


Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

      for (int j = 0; j < nCoefs - 1; ++j) {
        res[i][j] = coefs[i][j] * (nCoefs - j - 1);
      }
    }

    PiecewisePolynomialResult ppDiff = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs - 1, pp.getDimensions());

    return evaluate(ppDiff, xKey);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

      for (int j = 0; j < nCoefs - 1; ++j) {
        res[i][j] = coefs[i][j] * (nCoefs - j - 1);
      }
    }

    PiecewisePolynomialResult ppDiff = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs - 1, pp.getDimensions());

    return evaluate(ppDiff, xKeys);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

      for (int j = 0; j < nCoefs - 2; ++j) {
        res[i][j] = coefs[i][j] * (nCoefs - j - 1) * (nCoefs - j - 2);
      }
    }

    PiecewisePolynomialResult ppDiff = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs - 1, pp.getDimensions());

    return evaluate(ppDiff, xKey);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

      for (int j = 0; j < nCoefs - 2; ++j) {
        res[i][j] = coefs[i][j] * (nCoefs - j - 1) * (nCoefs - j - 2);
      }
    }

    PiecewisePolynomialResult ppDiff = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs - 1, pp.getDimensions());

    return evaluate(ppDiff, xKeys);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

      constTerms[i] = constTerms[i + 1] - getValue(res[i], knots[i + 1], knots[i]);
    }
    for (int i = 0; i < nKnots - 1; ++i) {
      res[i][nCoefs] = constTerms[i];
    }
    final PiecewisePolynomialResult ppInt = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs + 1, 1);

    return evaluate(ppInt, xKey).getData()[0];
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

    }
    for (int i = 0; i < nKnots - 1; ++i) {
      res[i][nCoefs] = constTerms[i];
    }

    final PiecewisePolynomialResult ppInt = new PiecewisePolynomialResult(new DoubleMatrix1D(knots), new DoubleMatrix2D(res), nCoefs + 1, 1);

    return new DoubleMatrix1D(evaluate(ppInt, xKeys).getData()[0]);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

        new double[][] { {1., -3., 3., -1 }, {1., 0., 0., 0. }, {1., 3., 3., 1. } });
    double[] xKeys = new double[] {1.5, 7. / 3., 29. / 7., INF };
    final int dim = 1;
    final int nCoefs = 4;

    PiecewisePolynomialResult pp = new PiecewisePolynomialResult(new DoubleMatrix1D(xValues), coefsMatrix, nCoefs, dim);
    PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();

    function.integrate(pp, 1., xKeys);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

        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[][] { {Double.NaN, 1, 2, 2.5 }, {1.5, 7. / 3., 29. / 7., 5. } };
    final int dim = 2;
    final int nCoefs = 4;

    PiecewisePolynomialResult pp = new PiecewisePolynomialResult(new DoubleMatrix1D(xValues), coefsMatrix, nCoefs, dim);
    PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();

    function.evaluate(pp, xKeys[0][0]);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

        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, Double.NaN, 2.5 }, {1.5, 7. / 3., 29. / 7., 5. } };
    final int dim = 2;
    final int nCoefs = 4;

    PiecewisePolynomialResult pp = new PiecewisePolynomialResult(new DoubleMatrix1D(xValues), coefsMatrix, nCoefs, dim);
    PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();

    function.evaluate(pp, xKeys[0]);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.PiecewisePolynomialResult

        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 }, {1.5, 7. / 3., 29. / 7., Double.NaN } };
    final int dim = 2;
    final int nCoefs = 4;

    PiecewisePolynomialResult pp = new PiecewisePolynomialResult(new DoubleMatrix1D(xValues), coefsMatrix, nCoefs, dim);
    PiecewisePolynomialFunction1D function = new PiecewisePolynomialFunction1D();

    function.evaluate(pp, xKeys);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.