public LinearInterpolatedTimeDiscreteProcess apply(DoubleUnaryOperator function) {
		Map<Double, RandomVariable> result = new HashMap<>();

		for(double time: timeDiscretization) {
			result.put(time, realizations.get(time).apply(function));
		}

		return new LinearInterpolatedTimeDiscreteProcess(timeDiscretization, result);
	}
public LinearInterpolatedTimeDiscreteProcess apply ( DoubleUnaryOperator function ) { Map < Double , RandomVariable > result = new HashMap < > ( ) ; for ( double time : timeDiscretization ) { result . put ( time , realizations . get ( time ) . apply ( function ) ) ; } return new LinearInterpolatedTimeDiscreteProcess ( timeDiscretization , result ) ; }
Create a new process consisting of the interpolation of the random variables obtained by
applying the given function to this process discrete set of random variables.
That is \( t \mapsto Y(t) \)
where
\[
Y(t) = \frac{t_{i+1} - t}{t_{i+1}-t_{i}} f(X(t_{i})) + \frac{t - t_{i}}{t_{i+1}-t_{i}} f(X(t_{i+1}))
\]
with \( t_{i} \leq t \leq t_{i+1} \) and a given function \( f \).

@param function The function \( f \), a univariate function.
@return A new process consisting of the interpolation of the random variables obtained by applying the given function to this process discrete set of random variables.