/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/LIBORCovarianceModelFromVolatilityAndCorrelation.java
factorLoadingPseudoInverse = factorLoadingPseudoInverse.mult( 1/factorElement) ;
factorLoadingPseudoInverse = factorLoadingPseudoInverse.mult ( 1/factorWeight ) ;
final int numberOfComponents = getLiborPeriodDiscretization().getNumberOfTimeSteps(); double factorWeight = 0.0; for(int componentIndex=0; componentIndex<numberOfComponents; componentIndex++) { final double factorElement = correlationModel.getFactorLoading(timeIndex, factor, componentIndex); factorWeight += factorElement*factorElement; } <extra_id_0> return factorLoadingPseudoInverse; } @Override public RandomVariable getCovariance(final int timeIndex, final int component1, final int component2, final RandomVariable[] realizationAtTimeIndex) { final RandomVariable volatilityOfComponent1 = volatilityModel.getVolatility(timeIndex, component1); final RandomVariable volatilityOfComponent2 = volatilityModel.getVolatility(timeIndex, component2);