Package com.opengamma.analytics.math.function

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


    PiecewisePolynomialResult resultPos = interpPos.interpolate(xValues, yValues);

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

  /**
   *
 
View Full Code Here


    PiecewisePolynomialResult resultPos = interpPos.interpolate(xValues, yValues);

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

  /**
   *
 
View Full Code Here

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

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

  /**
   *
 
View Full Code Here

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

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

  /**
   *
 
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]);
    }
  }

  /**
   *
 
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]);
    }
  }

  /**
   *
 
View Full Code Here

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

    assertEquals(resultPos.getOrder(), 6);

    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.);
      //      assertTrue(interpPos.interpolate(xValues, yValues, key) >= 0.);
    }

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

    assertEquals(resultPos.getOrder(), 6);

    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(), 6);

    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][5]);
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.