Package com.opengamma.analytics.math.function

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


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

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

    final int dim = yValues.length;
    final int nData = xValues.length;
    for (int j = 0; j < dim; ++j) {
View Full Code Here


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

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

    final int nData = xValues.length;
    for (int i = 1; i < nData - 2; ++i) {
      final double tau = Math.signum(resultPos.getCoefMatrix().getData()[i][3]);
View Full Code Here

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

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

    final int dim = yValues.length;
    final int nData = xValues.length;
    for (int j = 0; j < dim; ++j) {
View Full Code Here

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

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

    final int nData = xValues.length;
    for (int i = 0; i < nData - 1; ++i) {
      for (int k = 0; k < 4; ++k)
View Full Code Here

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

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

    final int dim = yValues.length;
    final int nData = xValues.length;
View Full Code Here

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

    final int dim = yValues.length;
    final int nData = xValues.length;
    for (int j = 0; j < dim; ++j) {
View Full Code Here

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

  /**
 
View Full Code Here

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

  /**
 
View Full Code Here

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

  /**
 
View Full Code Here

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

    key0 = 0.;
    for (int i = 1; i < nKeys; ++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.