/src/main/java/net/finmath/singleswaprate/data/DataTableLinear.java
maturities[i] = maturity; for( final int termination : baseTable.getTerminationsForMaturity( maturity) ) {for( final int maturity : baseTable.getMaturities( ) ) {
for ( final int maturity : baseTable.getMaturities ( ) ) { for ( final int termination : baseTable.getTerminationsForMaturity ( maturity ) ) { maturities[i] = maturity;
private static final UnivariateInterpolator sliceInterpolator = new LinearInterpolator(); public static DataTableLinear interpolateDataTable(final DataTableBasic baseTable) { final int[] maturities = new int[baseTable.size()]; final int[] terminations = new int[baseTable.size()]; final double[] values = new double[baseTable.size()]; int i = 0; <extra_id_0> terminations[i] = termination; values[i++] = baseTable.getValue(maturity, termination); } } return new DataTableLinear(baseTable.getName(), baseTable.getConvention(), baseTable.getReferenceDate(), baseTable.getScheduleMetaData(), maturities, terminations, values);