public class BrownianMotionJavaRandom 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 |
---|
BrownianMotionJavaRandom(TimeDiscretization timeDiscretization,
int numberOfFactors,
int numberOfPaths,
int seed)
Construct a Brownian motion.
|
BrownianMotionJavaRandom(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) |
BrownianMotion |
getCloneWithModifiedSeed(int seed) |
BrownianMotion |
getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization) |
RandomVariable |
getIncrement(int timeIndex,
int factor) |
int |
getNumberOfFactors() |
int |
getNumberOfPaths() |
RandomVariable |
getRandomVariableForConstant(double value) |
int |
getSeed() |
TimeDiscretization |
getTimeDiscretization() |
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getIncrement
public BrownianMotionJavaRandom(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 BrownianMotionJavaRandom(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)
getCloneWithModifiedSeed
in interface BrownianMotion
getCloneWithModifiedSeed
in interface IndependentIncrements
public BrownianMotion getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
getCloneWithModifiedTimeDiscretization
in interface BrownianMotion
getCloneWithModifiedTimeDiscretization
in interface IndependentIncrements
public RandomVariable getBrownianIncrement(int timeIndex, int factor)
getBrownianIncrement
in interface BrownianMotion
public TimeDiscretization getTimeDiscretization()
getTimeDiscretization
in interface BrownianMotion
getTimeDiscretization
in interface IndependentIncrements
public int getNumberOfFactors()
getNumberOfFactors
in interface BrownianMotion
getNumberOfFactors
in interface IndependentIncrements
public int getNumberOfPaths()
getNumberOfPaths
in interface BrownianMotion
getNumberOfPaths
in interface IndependentIncrements
public RandomVariable getRandomVariableForConstant(double value)
getRandomVariableForConstant
in interface BrownianMotion
getRandomVariableForConstant
in interface IndependentIncrements
public int getSeed()
public RandomVariable getIncrement(int timeIndex, int factor)
getIncrement
in interface IndependentIncrements
Copyright © 2019. All rights reserved.