umontreal.iro.lecuyer.stochprocess
Class BrownianMotionPCAEqualSteps
- java.lang.Object
-
- umontreal.iro.lecuyer.stochprocess.StochasticProcess
-
- umontreal.iro.lecuyer.stochprocess.BrownianMotion
-
- umontreal.iro.lecuyer.stochprocess.BrownianMotionPCAEqualSteps
-
public class BrownianMotionPCAEqualSteps extends BrownianMotion
Same as BrownianMotionPCA, but uses a trick to speed up the calculation when the time steps are equidistant.
-
-
Constructor Summary
Constructors Constructor and Description BrownianMotionPCAEqualSteps(double x0, double mu, double sigma, NormalGen gen)Constructs a new BrownianMotionPCAEqualSteps.BrownianMotionPCAEqualSteps(double x0, double mu, double sigma, RandomStream stream)Constructs a new BrownianMotionPCAEqualSteps.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]generatePath()Generates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}.double[]generatePath(double[] QMCpointsBM)Same as generatePath(), but a vector of uniform random numbers must be provided to the method.double[]getSortedEigenvalues()doublenextObservation()Generates and returns the next observation X(tj) of the stochastic process.voidsetObservationTimes(double[] t, int d)Sets the observation times of the process to a copy of T, with t0 = T[0] and td = T[d].voidsetObservationTimes(double dt, int d)Sets equidistant observation times at tj = jδ, for j = 0,..., d, and delta = δ.-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.BrownianMotion
generatePath, getGen, getMu, getSigma, getStream, nextObservation, nextObservation, setParams, setStream
-
Methods inherited from class umontreal.iro.lecuyer.stochprocess.StochasticProcess
getArrayMappingCounterToIndex, getCurrentObservation, getCurrentObservationIndex, getNbObservationTimes, getObservation, getObservationTimes, getPath, getSubpath, getX0, hasNextObservation, resetStartProcess, setX0
-
-
-
-
Constructor Detail
-
BrownianMotionPCAEqualSteps
public BrownianMotionPCAEqualSteps(double x0, double mu, double sigma, RandomStream stream)Constructs a new BrownianMotionPCAEqualSteps.
-
BrownianMotionPCAEqualSteps
public BrownianMotionPCAEqualSteps(double x0, double mu, double sigma, NormalGen gen)Constructs a new BrownianMotionPCAEqualSteps.
-
-
Method Detail
-
nextObservation
public double nextObservation()
Description copied from class:StochasticProcessGenerates and returns the next observation X(tj) of the stochastic process. The processes are usually sampled sequentially, i.e. if the last observation generated was for time tj-1, the next observation returned will be for time tj. In some cases, subclasses extending this abstract class may use non-sequential sampling algorithms (such as bridge sampling). The order of generation of the tj's is then specified by the subclass. All the processes generated using principal components analysis (PCA) do not have this method.- Overrides:
nextObservationin classBrownianMotion
-
generatePath
public double[] generatePath()
Description copied from class:StochasticProcessGenerates, returns, and saves the sample path {X(t0), X(t1),…, X(td)}. It can then be accessed via getPath, getSubpath, or getObservation. The generation method depends on the process type.- Overrides:
generatePathin classBrownianMotion
-
generatePath
public double[] generatePath(double[] QMCpointsBM)
Description copied from class:BrownianMotionSame as generatePath(), but a vector of uniform random numbers must be provided to the method. These uniform random numbers are used to generate the path.- Overrides:
generatePathin classBrownianMotion
-
setObservationTimes
public void setObservationTimes(double[] t, int d)Description copied from class:StochasticProcessSets the observation times of the process to a copy of T, with t0 = T[0] and td = T[d]. The size of T must be d + 1.- Overrides:
setObservationTimesin classStochasticProcess
-
setObservationTimes
public void setObservationTimes(double dt, int d)Description copied from class:StochasticProcessSets equidistant observation times at tj = jδ, for j = 0,..., d, and delta = δ.- Overrides:
setObservationTimesin classStochasticProcess
-
getSortedEigenvalues
public double[] getSortedEigenvalues()
-
-
DMelt 3.0 © DataMelt by jWork.ORG