/src/main/java/net/finmath/montecarlo/process/LinearInterpolatedTimeDiscreteProcess.java
final double timeUpper = timeDiscretization.getTimeIndexNearestLessOrEqual( time) ;
final double timeUpper = timeDiscretization.getTimeIndexNearestGreaterOrEqual ( time ) ;
result.put(time, realizations.get(time).apply(function)); } return new LinearInterpolatedTimeDiscreteProcess(timeDiscretization, result); } public RandomVariable getProcessValue(final double time, final int component) { final double timeLower = timeDiscretization.getTimeIndexNearestLessOrEqual(time); <extra_id_0> if(timeLower == timeUpper) { return realizations.get(timeLower); } final RandomVariable valueLower = realizations.get(timeLower); final RandomVariable valueUpper = realizations.get(timeUpper); return valueUpper.mult((time-timeLower)/(timeUpper-timeLower)).add(valueLower.mult((timeUpper-time)/(timeUpper-timeLower)));