Two State Markov Chain
class TwoStateMarkovChain(theInitialState: Int = 0, val p01: Double = 0.5, val p11: Double = 0.5, streamNumber: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider, name: String? = null) : RVariable(source)
Randomly generates the states of a two state discrete Markov Chain. Assumes that the states are labeled 0, 1
Author
rossetti
Parameters
the Initial State
the initial state, defaults to 0
p01
the probability of transitioning from state 0 to state 1
p11
the probability of transitioning from state 1 to state 1
stream Number
the random number stream number, defaults to 0, which means the next stream
stream Provider
the provider of random number streams, defaults to KSLRandom.DefaultRNStreamProvider
name
an optional name
Properties
Functions
Link copied to clipboard
open override fun instance(streamNum: Int, rnStreamProvider: RNStreamProviderIfc): TwoStateMarkovChain