Package com.opengamma.analytics.math.function

Examples of com.opengamma.analytics.math.function.PiecewisePolynomialFunction1D.evaluate()


      key0 = 5. + 1. / (len - 1) * i;
    }
    key0 = 5.;
    for (int i = 1; i < len; ++i) {
      final double key = 5. + 1. / (len - 1) * i;
      assertTrue(function.evaluate(resultPos, key).getData()[1] - function.evaluate(resultPos, key0).getData()[1] >= 0.);
      key0 = 5. + 1. / (len - 1) * i;
    }

    //    final int nKeys = 61;
    //    for (int i = 0; i < nKeys; ++i) {
View Full Code Here


      key0 = 5. + 1. / (len - 1) * i;
    }
    key0 = 5.;
    for (int i = 1; i < len; ++i) {
      final double key = 5. + 1. / (len - 1) * i;
      assertTrue(function.evaluate(resultPos, key).getData()[1] - function.evaluate(resultPos, key0).getData()[1] >= 0.);
      key0 = 5. + 1. / (len - 1) * i;
    }

    //    final int nKeys = 61;
    //    for (int i = 0; i < nKeys; ++i) {
View Full Code Here

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

    for (int i = 0; i < 71; ++i) {
      final double key = 1. + 7. / (71 - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
    }

    System.out.println("\n");

    for (int i = 0; i < 701; ++i) {
View Full Code Here

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

    for (int i = 0; i < 71; ++i) {
      final double key = 1. + 7. / (71 - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
    }

    System.out.println("\n");

    for (int i = 0; i < 701; ++i) {
View Full Code Here

    PiecewisePolynomialResult resultCube = interpCube.interpolate(xValues, yValues);

    final int nKeys = 1001;
    for (int i = 0; i < nKeys; ++i) {
      final double key = 2. + 11. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultCube, key).getData()[0] + "\t" + function.evaluate(resultQuin, key).getData()[0]);
    }

    System.out.println("\n");

    for (int i = 0; i < nKeys; ++i) {
View Full Code Here

    PiecewisePolynomialResult resultCube = interpCube.interpolate(xValues, yValues);

    final int nKeys = 1001;
    for (int i = 0; i < nKeys; ++i) {
      final double key = 2. + 11. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultCube, key).getData()[0] + "\t" + function.evaluate(resultQuin, key).getData()[0]);
    }

    System.out.println("\n");

    for (int i = 0; i < nKeys; ++i) {
View Full Code Here

    PiecewisePolynomialResult resultCube = interpCube.interpolate(xValues, yValues);

    final int nKeys = 1001;
    for (int i = 0; i < nKeys; ++i) {
      final double key = 2. + 11. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultCube, key).getData()[0] + "\t" + function.evaluate(resultQuin, key).getData()[0]);
    }

    System.out.println("\n");

    for (int i = 0; i < nKeys; ++i) {
View Full Code Here

    System.out.println(resultPos.getCoefMatrix());

    final int nKeys = 101;
    for (int i = 0; i < nKeys; ++i) {
      final double key = 1. + 5. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
    }
    System.out.println("\n");

    for (int i = 0; i < nKeys; ++i) {
      final double key = 3. + 0.5 / (nKeys - 1) * i;
 
View Full Code Here

    System.out.println(resultPos.getCoefMatrix());

    final int nKeys = 101;
    for (int i = 0; i < nKeys; ++i) {
      final double key = 1. + 5. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
    }
    System.out.println("\n");

    for (int i = 0; i < nKeys; ++i) {
      final double key = 3. + 0.5 / (nKeys - 1) * i;
 
View Full Code Here

    System.out.println(resultPos.getCoefMatrix());

    final int nKeys = 101;
    for (int i = 0; i < nKeys; ++i) {
      final double key = +30. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
    }

    for (int i = 0; i < nKeys; ++i) {
      final double key = 2. + 30. / (nKeys - 1) * i;
      System.out.println(key + "\t" + function.differentiateTwice(resultPos, key).getData()[0]);
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.