public IDoubleArray correlation(IDoubleArray M, IDoubleArray observable1, IDoubleArray observable2, IDoubleArray timepoints)
{
IDynamicalExpectations dexp = MarkovModel.create.createDynamicalExpectations(M);
IDoubleArray res = Doubles.create.array(timepoints.size());
for (int i=0; i<res.size(); i++)
res.set(i, dexp.calculateCorrelation(observable1, observable2, timepoints.get(i)));
return(res);
}
/**
* Calculates the crosscorrelation function of the given observables under the dynamical action of M at the given timepoints