/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/LIBORCorrelationModelExponentialDecay.java
factorMatrix = LinearAlgebra.factorReduction ( correlationMatrix, numberOfFactors ) ;
correlationMatrix = new double[getLiborPeriodDiscretization().getNumberOfTimeSteps()][getLiborPeriodDiscretization().getNumberOfTimeSteps()]; for(int row=0; row<correlationMatrix.length; row++) { for(int col=0; col<correlationMatrix[row].length; col++) { correlationMatrix[row][col] = Math.exp(-a * Math.abs(getLiborPeriodDiscretization().getTime(row)-getLiborPeriodDiscretization().getTime(col))); } } <extra_id_0> for(int component1=0; component1<factorMatrix.length; component1++) { for(int component2=0; component2<component1; component2++) { double correlation = 0.0; for(int factor=0; factor<factorMatrix[component1].length; factor++) { correlation += factorMatrix[component1][factor] * factorMatrix[component2][factor]; }