Package com.opengamma.analytics.math.function

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


    assertEquals(resultPos.getOrder(), result.getOrder());

    assertTrue(function.evaluate(resultPos, 4.5).getData()[0] - function.evaluate(resultPos, 4).getData()[0] >= 0.);
    assertTrue(function.evaluate(resultPos, 4.5).getData()[0] - function.evaluate(resultPos, 5).getData()[0] >= 0.);
    assertTrue(function.evaluate(resultPos, 4.5).getData()[1] - function.evaluate(resultPos, 4).getData()[1] <= 0.);
    assertTrue(function.evaluate(resultPos, 4.5).getData()[1] - function.evaluate(resultPos, 5).getData()[1] <= 0.);

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


    final int nKeys = 41;
    double key0 = 1.;
    for (int i = 1; i < nKeys; ++i) {
      final double key = 1. + 3. / (nKeys - 1) * i;
      assertTrue(function.evaluate(resultPos, key).getData()[0] - function.evaluate(resultPos, key0).getData()[0] >= 0.);
      //      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
      key0 = 1. + 3. / (nKeys - 1) * i;
    }
    key0 = 1.;
    for (int i = 1; i < nKeys; ++i) {
View Full Code Here

    final int nKeys = 41;
    double key0 = 1.;
    for (int i = 1; i < nKeys; ++i) {
      final double key = 1. + 3. / (nKeys - 1) * i;
      assertTrue(function.evaluate(resultPos, key).getData()[0] - function.evaluate(resultPos, key0).getData()[0] >= 0.);
      //      System.out.println(key + "\t" + function.evaluate(result, key).getData()[0] + "\t" + function.evaluate(resultPos, key).getData()[0]);
      key0 = 1. + 3. / (nKeys - 1) * i;
    }
    key0 = 1.;
    for (int i = 1; i < nKeys; ++i) {
View Full Code Here

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

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

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

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

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

View Full Code Here

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

View Full Code Here

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

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.