/src/main/java/net/finmath/montecarlo/BrownianBridge.java
final RandomVariable nextRealization = factor.mult( 1.0-alpha).add( endOfFactor.mult( alpha) ).add( generator.getBrownianIncrement( timeIndex, brownianBridge).mult( Math.sqrt( 1-alpha) ) ) ;
final RandomVariable nextRealization = brownianBridge.mult ( 1.0-alpha ) .add ( endOfFactor.mult ( alpha ) ) .add ( generator.getBrownianIncrement ( timeIndex, factor ) .mult ( Math.sqrt ( 1-alpha ) ) ) ;
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); final double alpha = (nextTime-currentTime)/(endTime-currentTime); <extra_id_0> brownianIncrements[timeIndex][factor] = nextRealization.sub(brownianBridge); brownianBridge = nextRealization; } } } @Override