first Passage Frequency
fun firstPassageFrequency(sampleSize: Int, startState: Int, desiredState: Int, transitionLimit: Int = 10000): IntegerFrequency(source)
Estimates the first passage time distribution from the starting state to the desired state as an IntegerFrequency based on the provided sample size sampleSize.
The desired state may be unreachable from the starting state. The transition limit transitionLimit represents the maximum number of transitions allowed before returning. By default, this is 10000.
If that limit is reached the returned frequency is not usable. Collection stops at the first such observation, so the frequency holds fewer than sampleSize observations and one of them is Int.MAX_VALUE. Any average taken from it is meaningless. Check the largest observed value before using the result.