From 2807ebe0fedac3af0a96e486c9039947bad23e48 Mon Sep 17 00:00:00 2001 From: Christian Fries Date: Fri, 20 Oct 2023 16:33:44 +0200 Subject: [PATCH] Using model's own getNumberOfFactors. --- .../models/LIBORMarketModelFromCovarianceModel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelFromCovarianceModel.java b/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelFromCovarianceModel.java index 1a56e556bf..49b30c2ad2 100644 --- a/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelFromCovarianceModel.java +++ b/src/main/java/net/finmath/montecarlo/interestrate/models/LIBORMarketModelFromCovarianceModel.java @@ -1141,7 +1141,7 @@ public RandomVariable[] getDrift(final MonteCarloProcess process, final int time } // Allocate array (for each k) for the sums of delta_{i}/(1+L_{i} \delta_i) f_{i,k} (+ for spot measure, - for terminal measure) - final RandomVariable[] factorLoadingsSums = new RandomVariable[process.getNumberOfFactors()]; + final RandomVariable[] factorLoadingsSums = new RandomVariable[getNumberOfFactors()]; Arrays.fill(factorLoadingsSums, zero); if(measure == Measure.SPOT) {