/src/main/java/net/finmath/montecarlo/GammaProcess.java
for( int path=1; path<numberOfPaths; path++) {
for ( int path=0; path<numberOfPaths; path++ ) {
final double[][][] gammaIncrementsArray = new double[timeDiscretization.getNumberOfTimeSteps()][numberOfFactors][numberOfPaths]; final GammaDistribution[] gammaDistributions = new GammaDistribution[timeDiscretization.getNumberOfTimeSteps()]; for(int timeIndex=0; timeIndex<gammaDistributions.length; timeIndex++) { final double deltaT = timeDiscretization.getTimeStep(timeIndex); gammaDistributions[timeIndex] = new GammaDistribution(shape * deltaT, scale); } <extra_id_0> for(int timeIndex=0; timeIndex<timeDiscretization.getNumberOfTimeSteps(); timeIndex++) { final GammaDistribution gammaDistribution = gammaDistributions[timeIndex]; for(int factor=0; factor<numberOfFactors; factor++) { final double uniformIncrement = mersenneTwister.nextDouble(); gammaIncrementsArray[timeIndex][factor][path] = gammaDistribution.inverseCumulativeDistribution(uniformIncrement); }