umontreal.iro.lecuyer.markovchain
Class MarkovChainComparable
java.lang.Object
umontreal.iro.lecuyer.markovchain.MarkovChain
umontreal.iro.lecuyer.markovchain.MarkovChainComparable
- All Implemented Interfaces:
- Cloneable, MultiDimComparable<MarkovChainComparable>
- Direct Known Subclasses:
- MarkovChainComparableStop, MarkovChainDouble
public abstract class MarkovChainComparable
- extends MarkovChain
- implements MultiDimComparable<MarkovChainComparable>
A subclass of Markov chain for which there is a total ordering
between the states in each dimension induced by the implementation
of the MultiDimComparable interface in package
umontreal.iro.lecuyer.util. A list or array of Markov
chains can then be sorted according to their states at a given
step, using a
MultiDimComparator
and an external sorting method.
The method compareTo(MarkovChainComparable m, int i) must
return a negative integer, zero, or a positive integer as the
implicit Markov chain is considered smaller than, equal to, or
greater than m in dimension i. The meaning of
smaller, equal or larger is very flexible as well as the meaning
of dimension.
Concrete subclasses must implement compareTo and must
initialize variable stateDim in the constructor to the
value of the state dimension. It can be understood as the largest
integer j for which the method compareTo(m,j)
can be called. They must also implement abstract methods of
MarkovChain.
Method Summary |
int |
dimension()
Returns the dimension of the state. |
Methods inherited from class umontreal.iro.lecuyer.markovchain.MarkovChain |
clone, formatResults, formatResultsRQMC, getPerformance, hasStopped, initialState, nextStep, simulRQMC, simulRQMC, simulRQMCFormat, simulRuns, simulRunsFormat, simulRunsWithSubstreams, simulRunsWithSubstreamsFormat, simulSteps, simulSteps, testImprovementRQMC |
MarkovChainComparable
public MarkovChainComparable()
dimension
public int dimension()
- Returns the dimension of the state.
- Specified by:
dimension
in interface MultiDimComparable<MarkovChainComparable>
To submit a bug or ask questions, send an e-mail to
Pierre L'Ecuyer.