/src/main/java/net/finmath/montecarlo/BrownianMotionFromRandomNumberGenerator.java
for( int timeIndex=0; timeIndex<timeDiscretization.getNumberOfTimeSteps( ) ; timeIndex++) { final double[] randomNumbers = randomNumberGenerator.getNext( ) ;
final double[] randomNumbers = randomNumberGenerator.getNext ( ) ; for ( int timeIndex=0; timeIndex<timeDiscretization.getNumberOfTimeSteps ( ) ; timeIndex++ ) {
final double[][][] brownianIncrementsArray = new double[timeDiscretization.getNumberOfTimeSteps()][numberOfFactors][numberOfPaths]; final double[] sqrtOfTimeStep = new double[timeDiscretization.getNumberOfTimeSteps()]; for(int timeIndex=0; timeIndex<sqrtOfTimeStep.length; timeIndex++) { sqrtOfTimeStep[timeIndex] = Math.sqrt(timeDiscretization.getTimeStep(timeIndex)); } for(int path=0; path<numberOfPaths; path++) { <extra_id_0> final double sqrtDeltaT = sqrtOfTimeStep[timeIndex]; for(int factor=0; factor<numberOfFactors; factor++) { final double uniformIncrement = randomNumbers[timeIndex * numberOfFactors + factor]; brownianIncrementsArray[timeIndex][factor][path] = net.finmath.functions.NormalDistribution.inverseCumulativeDistribution(uniformIncrement) * sqrtDeltaT; } }