|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.markovchain.ArrayOfComparableChains
umontreal.iro.lecuyer.markovchain.ArrayOfDoubleChains
public class ArrayOfDoubleChains
Similar to ArrayOfComparableChains
, except that instead of
working with n clones of a MarkovChain
, we use a single
MarkovChainDouble
object for all the chains.
The states of the chains are maintained in an array of real numbers
(double) and the nextStepDouble
method is used to advance each chain by one step.
The performance measure is assumed to be additive over all steps of all
copies of the chain.
The sum is cumulated in a single accumulator for all
copies of the chain, updated at each step of each copy.
Constructor Summary | |
---|---|
ArrayOfDoubleChains(MarkovChainDouble baseChain)
Same as ArrayOfDoubleChains (baseChain, new RandomShift(new MRG32k3a())). |
|
ArrayOfDoubleChains(MarkovChainDouble baseChain,
PointSetRandomization rand)
Creates a virtual array for the chain baseChain. |
Method Summary | |
---|---|
double |
calcMeanPerf()
Computes and returns the mean performance of the n chains. |
double[] |
getStatesDouble()
Returns the array containing the states of the n chains. |
void |
initStatesDouble()
Initializes the states of the n copies of the base chain. |
void |
makeCopies(int n)
Creates the vector of states for n copies of the base chain. |
void |
setStatesDouble(double[] S)
Sets the states of the n copies of the base chain to S. |
double |
simulArrayRQMC(PointSet p,
int numSteps)
Simulates the n copies of the chain, numSteps steps for each copy, using point set p, where n is the current number of copies of the chain and is assumed to equal the number of points in p. |
boolean |
simulOneStepArrayRQMC(int step,
PointSet p)
Simulate one step for the n copies of the base chain, assuming that we are at step step. |
void |
sortChains()
Sorts the arrays containing the states of the n chains. |
String |
toString()
Creates a String with the states. |
Methods inherited from class umontreal.iro.lecuyer.markovchain.ArrayOfComparableChains |
---|
getChains, getN, getPerformances, getRandomization, getSort, initialStates, setRandomization, setSort, simulOneStepArrayRQMC, simulReplicatesArrayRQMC, sortNotStoppedChains, testImprovementArrayRQMC |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayOfDoubleChains(MarkovChainDouble baseChain, PointSetRandomization rand)
public ArrayOfDoubleChains(MarkovChainDouble baseChain)
ArrayOfDoubleChains
(baseChain, new RandomShift(new MRG32k3a())).
Method Detail |
---|
public void makeCopies(int n)
makeCopies
in class ArrayOfComparableChains
public void setStatesDouble(double[] S)
public double[] getStatesDouble()
public void initStatesDouble()
public boolean simulOneStepArrayRQMC(int step, PointSet p)
PointSetRandomization
.
The dimension of p must be at least as large as
the number of uniforms required to simulate one step of the chain.
Returns true if and only if all chains have
stopped. Compute and stores the performances.
public double simulArrayRQMC(PointSet p, int numSteps)
PointSetRandomization
.
The dimension of p must be at least as large as
the number of uniforms required to simulate one step of the chain.
Returns the average performance per run.
simulArrayRQMC
in class ArrayOfComparableChains
public double calcMeanPerf()
calcMeanPerf
in class ArrayOfComparableChains
public void sortChains()
sortChains
in class ArrayOfComparableChains
public String toString()
toString
in class Object
|
SSJ V. labo. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |