/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/AbstractLIBORCovarianceModel.java
final RandomVariable[] factorLoadingOfComponent2 = getFactorLoading( realizationAtTimeIndex, component2, timeIndex) ;
final RandomVariable[] factorLoadingOfComponent2 = getFactorLoading ( timeIndex, component2, realizationAtTimeIndex ) ;
} return getCovariance(timeIndex, component1, component2, realizationAtTimeIndex); } @Override public RandomVariable getCovariance(final int timeIndex, final int component1, final int component2, final RandomVariable[] realizationAtTimeIndex) { final RandomVariable[] factorLoadingOfComponent1 = getFactorLoading(timeIndex, component1, realizationAtTimeIndex); <extra_id_0> RandomVariable covariance = factorLoadingOfComponent1[0].mult(factorLoadingOfComponent2[0]); for(int factorIndex=1; factorIndex<this.getNumberOfFactors(); factorIndex++) { covariance = covariance.addProduct(factorLoadingOfComponent1[factorIndex],factorLoadingOfComponent2[factorIndex]); } return covariance; }