firstPassageFrequency

fun firstPassageFrequency(sampleSize: Int, startState: Int, desiredState: Int, transitionLimit: Int = 10000): IntegerFrequency

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. The transition count will be Int.MAX_VALUE in this case, essential infinity.