Package com.opengamma.analytics.financial.provider.curve

Examples of com.opengamma.analytics.financial.provider.curve.CurveBuildingBlock


  @Test
  public void testCurveBuildingBlockBundle() {
    final LinkedHashMap<String, Pair<Integer, Integer>> data1 = new LinkedHashMap<>();
    data1.put("YC1", Pair.of(Integer.valueOf(0), Integer.valueOf(2)));
    data1.put("YC2", Pair.of(Integer.valueOf(2), Integer.valueOf(3)));
    final CurveBuildingBlock curveBuildingBlock1 = new CurveBuildingBlock(data1);
    final DoubleMatrix2D matrix1 = new DoubleMatrix2D(new double[][] {new double[] {1, 2, 3, 4}, new double[] {5, 6, 7, 8}});
    final LinkedHashMap<String, Pair<Integer, Integer>> data2 = new LinkedHashMap<>();
    data2.put("YC3", Pair.of(Integer.valueOf(0), Integer.valueOf(1)));
    data2.put("YC4", Pair.of(Integer.valueOf(1), Integer.valueOf(2)));
    final CurveBuildingBlock curveBuildingBlock2 = new CurveBuildingBlock(data2);
    final DoubleMatrix2D matrix2 = new DoubleMatrix2D(new double[][] {new double[] {9, 8, 7}, new double[] {6, 5, 4}});
    final LinkedHashMap<String, Pair<CurveBuildingBlock, DoubleMatrix2D>> data = new LinkedHashMap<>();
    data.put("B1", Pair.of(curveBuildingBlock1, matrix1));
    data.put("B2", Pair.of(curveBuildingBlock2, matrix2));
    final CurveBuildingBlockBundle cbbb = new CurveBuildingBlockBundle(data);
View Full Code Here


  public void testCurveBuildingBlock() {
    final LinkedHashMap<String, Pair<Integer, Integer>> data = new LinkedHashMap<>();
    data.put("A", Pair.of(Integer.valueOf(3), Integer.valueOf(4)));
    data.put("B", Pair.of(Integer.valueOf(6), Integer.valueOf(8)));
    data.put("C", Pair.of(Integer.valueOf(34), Integer.valueOf(536)));
    final CurveBuildingBlock block = new CurveBuildingBlock(data);
    assertEquals(block, cycleObject(CurveBuildingBlock.class, block));
  }
View Full Code Here

  public void testCurveBuildingBlockBundle() {
    final LinkedHashMap<String, Pair<Integer, Integer>> data1 = new LinkedHashMap<>();
    data1.put("A", Pair.of(Integer.valueOf(3), Integer.valueOf(4)));
    data1.put("B", Pair.of(Integer.valueOf(6), Integer.valueOf(8)));
    data1.put("C", Pair.of(Integer.valueOf(34), Integer.valueOf(536)));
    final CurveBuildingBlock block1 = new CurveBuildingBlock(data1);
    final LinkedHashMap<String, Pair<Integer, Integer>> data2 = new LinkedHashMap<>();
    data2.put("A", Pair.of(Integer.valueOf(13), Integer.valueOf(14)));
    data2.put("B", Pair.of(Integer.valueOf(16), Integer.valueOf(18)));
    data2.put("C", Pair.of(Integer.valueOf(134), Integer.valueOf(1536)));
    final CurveBuildingBlock block2 = new CurveBuildingBlock(data2);
    final LinkedHashMap<String, Pair<Integer, Integer>> data3 = new LinkedHashMap<>();
    data3.put("A", Pair.of(Integer.valueOf(23), Integer.valueOf(24)));
    data3.put("B", Pair.of(Integer.valueOf(26), Integer.valueOf(28)));
    data3.put("C", Pair.of(Integer.valueOf(234), Integer.valueOf(2536)));
    final CurveBuildingBlock block3 = new CurveBuildingBlock(data3);
    final LinkedHashMap<String, Pair<CurveBuildingBlock, DoubleMatrix2D>> data = new LinkedHashMap<>();
    data.put("Q", Pair.of(block1, new DoubleMatrix2D(new double[][] {new double[] {2, 4}, new double[] {5, 6}})));
    data.put("W", Pair.of(block2, new DoubleMatrix2D(new double[][] {new double[] {12, 14}, new double[] {15, 16}})));
    data.put("E", Pair.of(block3, new DoubleMatrix2D(new double[][] {new double[] {22, 24}, new double[] {25, 26}})));
    final CurveBuildingBlockBundle bundle = new CurveBuildingBlockBundle(data);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.provider.curve.CurveBuildingBlock

Copyright © 2018 www.massapicom. 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.