public class BrownianMotionLazyInit extends Object implements BrownianMotion, Serializable
CorrelatedBrownianMotion.
Here the dimension n is called factors since this Brownian motion is used to
generate multi-dimensional multi-factor Ito processes and there one might
use a different number of factors to generate Ito processes of different
dimension.
The quadruppel (time discretization, number of factors, number of paths, seed)
defines the state of an object of this class, i.e., BrownianMotionLazyInit for which
there parameters agree, generate the same random numbers.
The class is immutable and thread safe. It uses lazy initialization.| Constructor and Description |
|---|
BrownianMotionLazyInit(TimeDiscretization timeDiscretization,
int numberOfFactors,
int numberOfPaths,
int seed)
Construct a Brownian motion.
|
BrownianMotionLazyInit(TimeDiscretization timeDiscretization,
int numberOfFactors,
int numberOfPaths,
int seed,
AbstractRandomVariableFactory randomVariableFactory)
Construct a Brownian motion.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
RandomVariable |
getBrownianIncrement(int timeIndex,
int factor)
Return the Brownian increment for a given timeIndex.
|
BrownianMotion |
getCloneWithModifiedSeed(int seed)
Return a new object implementing BrownianMotion
having the same specifications as this object but a different seed
for the random number generator.
|
BrownianMotion |
getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
Return a new object implementing BrownianMotion
having the same specifications as this object but a different
time discretization.
|
RandomVariable |
getIncrement(int timeIndex,
int factor)
Return the increment for a given timeIndex and given factor.
|
int |
getNumberOfFactors()
Returns the number of factors.
|
int |
getNumberOfPaths()
Returns the number of paths.
|
RandomVariable |
getRandomVariableForConstant(double value)
Returns a random variable which is initialized to a constant,
but has exactly the same number of paths or discretization points as the ones used by this BrownianMotion.
|
int |
getSeed() |
TimeDiscretization |
getTimeDiscretization()
Returns the time discretization used for this set of time-discrete Brownian increments.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetIncrementpublic BrownianMotionLazyInit(TimeDiscretization timeDiscretization, int numberOfFactors, int numberOfPaths, int seed, AbstractRandomVariableFactory randomVariableFactory)
timeDiscretization - The time discretization used for the Brownian increments.numberOfFactors - Number of factors.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.randomVariableFactory - Factory to be used to create random variable.public BrownianMotionLazyInit(TimeDiscretization timeDiscretization, int numberOfFactors, int numberOfPaths, int seed)
timeDiscretization - The time discretization used for the Brownian increments.numberOfFactors - Number of factors.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.public BrownianMotion getCloneWithModifiedSeed(int seed)
BrownianMotiongetCloneWithModifiedSeed in interface BrownianMotiongetCloneWithModifiedSeed in interface IndependentIncrementsseed - New value for the seed.public BrownianMotion getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
BrownianMotiongetCloneWithModifiedTimeDiscretization in interface BrownianMotiongetCloneWithModifiedTimeDiscretization in interface IndependentIncrementsnewTimeDiscretization - New time discretizationpublic RandomVariable getBrownianIncrement(int timeIndex, int factor)
BrownianMotiongetBrownianIncrement in interface BrownianMotiontimeIndex - The time index (corresponding to the this class's time discretization).factor - The index of the factor (independent scalar Brownian increment).public TimeDiscretization getTimeDiscretization()
BrownianMotiongetTimeDiscretization in interface BrownianMotiongetTimeDiscretization in interface IndependentIncrementspublic int getNumberOfFactors()
BrownianMotiongetNumberOfFactors in interface BrownianMotiongetNumberOfFactors in interface IndependentIncrementspublic int getNumberOfPaths()
BrownianMotiongetNumberOfPaths in interface BrownianMotiongetNumberOfPaths in interface IndependentIncrementspublic RandomVariable getRandomVariableForConstant(double value)
BrownianMotiongetRandomVariableForConstant in interface BrownianMotiongetRandomVariableForConstant in interface IndependentIncrementsvalue - The constant value to be used for initialized the random variable.public int getSeed()
public RandomVariable getIncrement(int timeIndex, int factor)
IndependentIncrementsgetIncrement in interface IndependentIncrementstimeIndex - The time index (corresponding to the this class's time discretization)factor - The index of the factor (independent scalar increment)Copyright © 2019. All rights reserved.