public class SimpleMC extends Object implements RandomNumberGenerator
Constructor and Description |
---|
SimpleMC(Vector PI,
Matrix A)
Constructs a time-homogeneous Markov chain with a finite state space.
|
Modifier and Type | Method and Description |
---|---|
ImmutableMatrix |
A()
Gets the state transition probabilities.
|
static int |
bin(MultinomialRVG rvg)
Picks the first non-empty bin.
|
static Vector |
getStationaryProbabilities(Matrix A)
Gets the stationary state probabilities of a Markov chain that is irreducible, aperiodic and
strongly connected (positive recurrent).
|
double |
nextDouble()
Gets the next simulated state.
|
int |
nextState()
Gets the next simulated state.
|
int |
nStates()
Gets the number of states.
|
ImmutableVector |
PI()
Gets the initial state probabilities.
|
void |
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
|
public void seed(long... seeds)
Seedable
public double nextDouble()
nextDouble
in interface RandomNumberGenerator
public int nextState()
public ImmutableVector PI()
public ImmutableMatrix A()
public int nStates()
public static Vector getStationaryProbabilities(Matrix A)
A
- the transition matrixpublic static int bin(MultinomialRVG rvg)
rvg
- a MultinomialRVG
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.