507508509510511512513514515
/** * Creates a stochastic realization of the chain */ public IIntArray trajectory(IDoubleArray T, int s, int length) { IMarkovChain mc = new MarkovChain(T); mc.setStartingState(s); return mc.randomTrajectory(length); }
517518519520521522523524525
/** * Creates a stochastic realization of the chain */ public IIntArray trajectoryToState(IDoubleArray T, int s, int[] endStates) { IMarkovChain mc = new MarkovChain(T); mc.setStartingState(s); return mc.randomTrajectoryToState(endStates); }