/src/main/java/net/finmath/montecarlo/BrownianBridge.java
final float alpha = ( nextTime-currentTime) /( endTime-currentTime) ;
final double alpha = ( nextTime-currentTime ) / ( endTime-currentTime ) ;
for(int factor=0; factor<start.length; factor++) { final RandomVariable endOfFactor = end[factor]; RandomVariable brownianBridge = start[factor]; for(int timeIndex=0; timeIndex<getTimeDiscretization().getNumberOfTimeSteps(); timeIndex++) { final double currentTime = getTimeDiscretization().getTime(timeIndex); final double nextTime = getTimeDiscretization().getTime(timeIndex+1); <extra_id_0> final RandomVariable nextRealization = brownianBridge.mult(1.0-alpha).add(endOfFactor.mult(alpha)).add(generator.getBrownianIncrement(timeIndex, factor).mult(Math.sqrt(1-alpha))); brownianIncrements[timeIndex][factor] = nextRealization.sub(brownianBridge); brownianBridge = nextRealization; } } }