Package com.opengamma.analytics.financial.model.finitedifference

Examples of com.opengamma.analytics.financial.model.finitedifference.MeshingFunction.evaluate()


    final PDEGrid1D[] grid;
    final double[] theta;

    if (_useBurnin) {
      final int tBurnNodes = (int) Math.max(2, timeNodes * _burninFrac);
      final double dt = tMesh.evaluate(1) - tMesh.evaluate(0);
      final double tBurn = tBurnNodes * dt * dt;
      final MeshingFunction tBurnMesh = new ExponentialMeshing(0, tBurn, tBurnNodes, 0.0);
      tMesh = new ExponentialMeshing(tBurn, t, timeNodes - tBurnNodes, lambda);
      grid = new PDEGrid1D[2];
      grid[0] = new PDEGrid1D(tBurnMesh, xMesh);
View Full Code Here


    final PDEGrid1D[] grid;
    final double[] theta;

    if (_useBurnin) {
      final int tBurnNodes = (int) Math.max(2, timeNodes * _burninFrac);
      final double dt = tMesh.evaluate(1) - tMesh.evaluate(0);
      final double tBurn = tBurnNodes * dt * dt;
      final MeshingFunction tBurnMesh = new ExponentialMeshing(0, tBurn, tBurnNodes, 0.0);
      tMesh = new ExponentialMeshing(tBurn, t, timeNodes - tBurnNodes, lambda);
      grid = new PDEGrid1D[2];
      grid[0] = new PDEGrid1D(tBurnMesh, xMesh);
View Full Code Here

    final PDEGrid1D[] grid;
    final double[] theta;

    if (_useBurnin) {
      final int tBurnNodes = (int) Math.max(2, timeNodes * _burninFrac);
      final double dt = tMesh.evaluate(1) - tMesh.evaluate(0);
      final double tBurn = tBurnNodes * dt * dt;
      final MeshingFunction tBurnMesh = new ExponentialMeshing(0, tBurn, tBurnNodes, 0.0);
      tMesh = new ExponentialMeshing(tBurn, t, timeNodes - tBurnNodes, lambda);
      grid = new PDEGrid1D[2];
      grid[0] = new PDEGrid1D(tBurnMesh, xMesh);
View Full Code Here

    final PDEGrid1D[] grid;
    final double[] theta;

    if (_useBurnin) {
      final int tBurnNodes = (int) Math.max(2, timeNodes * _burninFrac);
      final double dt = tMesh.evaluate(1) - tMesh.evaluate(0);
      final double tBurn = tBurnNodes * dt * dt;
      final MeshingFunction tBurnMesh = new ExponentialMeshing(0, tBurn, tBurnNodes, 0.0);
      tMesh = new ExponentialMeshing(tBurn, t, timeNodes - tBurnNodes, lambda);
      grid = new PDEGrid1D[2];
      grid[0] = new PDEGrid1D(tBurnMesh, xMesh);
View Full Code Here

      timeGrid[n] = timeMesh.evaluate(n);
    }

    final double[] spaceGrid = new double[xNodes];
    for (int i = 0; i < xNodes; i++) {
      spaceGrid[i] = spaceMesh.evaluate(i);
    }
    final PDEGrid1D grid = new PDEGrid1D(timeGrid, spaceGrid);

    final PDEResults1D[] res = solver.solve(DATA1, DATA2, grid, LOWER, UPPER, LOWER, UPPER, null);
    final PDEFullResults1D res1 = (PDEFullResults1D) res[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.