public class IndependentIncrements extends Object implements IndependentIncrementsInterface, Serializable
numberOfFactors.
where each component of \( Z_{j}(t_{i}) \) is given by
\[
Z_{j}(t_{i}) = ICDF_{i,j}(U_{i,j})
\]
for a sequence of independent uniform distributes random variables U_{i,j}.
The inverse cumulative distribution functions \( ICDF_{i,j} \) are given by
inverseCumulativeDistributionFunctions as the
map \( i \mapsto ( j \mapsto ICDF_{i,j} ) \) (here i is the time index and j is the factor (component).
Each \( U_{i,j} \) is samples using numberOfPaths.
The class is immutable and thread safe. It uses lazy initialization.| Constructor and Description |
|---|
IndependentIncrements(TimeDiscretizationInterface timeDiscretization,
int numberOfFactors,
int numberOfPaths,
int seed,
IntFunction<IntFunction<DoubleUnaryOperator>> inverseCumulativeDistributionFunctions)
Construct the simulation of independet increments.
|
IndependentIncrements(TimeDiscretizationInterface timeDiscretization,
int numberOfFactors,
int numberOfPaths,
int seed,
IntFunction<IntFunction<DoubleUnaryOperator>> inverseCumulativeDistributionFunctions,
AbstractRandomVariableFactory randomVariableFactory)
Construct the simulation of independent increments.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
IndependentIncrementsInterface |
getCloneWithModifiedSeed(int seed)
Return a new object implementing BrownianMotionInterface
having the same specifications as this object but a different seed
for the random number generator.
|
IndependentIncrementsInterface |
getCloneWithModifiedTimeDiscretization(TimeDiscretizationInterface newTimeDiscretization)
Return a new object implementing BrownianMotionInterface
having the same specifications as this object but a different
time discretization.
|
RandomVariableInterface |
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.
|
RandomVariableInterface |
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 BrownianMotionInterface.
|
int |
getSeed() |
TimeDiscretizationInterface |
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 IndependentIncrements(TimeDiscretizationInterface timeDiscretization, int numberOfFactors, int numberOfPaths, int seed, IntFunction<IntFunction<DoubleUnaryOperator>> inverseCumulativeDistributionFunctions, AbstractRandomVariableFactory randomVariableFactory)
numberOfFactors.
where each component of \( Z_{j}(t_{i}) \) is given by
\[
Z_{j}(t_{i}) = ICDF_{i,j}(U_{i,j})
\]
for a sequence of independent uniform distributes random variables U_{i,j}.
The inverse cumulative distribution functions \( ICDF_{i,j} \) are given by
inverseCumulativeDistributionFunctions as the
map \( i \mapsto ( j \mapsto ICDF_{i,j} ) \) (here i is the time index and j is the factor (component).
Each \( U_{i,j} \) is samples using numberOfPaths.
The constructor allows to set the factory to be used for the construction of
random variables. This allows to generate increments represented
by different implementations of the RandomVariableInterface
(e.g. the RandomVariableLowMemory internally using float representations).timeDiscretization - The time discretization used for the increments.numberOfFactors - Number of factors.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.inverseCumulativeDistributionFunctions - A map from the timeIndices to a map from the from the factors to the corresponding inverse cumulative distribution function.randomVariableFactory - Factory to be used to create random variable.public IndependentIncrements(TimeDiscretizationInterface timeDiscretization, int numberOfFactors, int numberOfPaths, int seed, IntFunction<IntFunction<DoubleUnaryOperator>> inverseCumulativeDistributionFunctions)
numberOfFactors.
where each component of \( Z_{j}(t_{i}) \) is given by
\[
Z_{j}(t_{i}) = ICDF_{i,j}(U_{i,j})
\]
for a sequence of independent uniform distributes random variables U_{i,j}.
The inverse cumulative distribution functions \( ICDF_{i,j} \) are given by
inverseCumulativeDistributionFunctions as the
map \( i \mapsto ( j \mapsto ICDF_{i,j} ) \) (here i is the time index and j is the factor (component).
Each \( U_{i,j} \) is samples using numberOfPaths.timeDiscretization - The time discretization used for the increments.numberOfFactors - Number of factors.numberOfPaths - Number of paths to simulate.seed - The seed of the random number generator.inverseCumulativeDistributionFunctions - A map from the timeIndices to a map from the from the factors to the corresponding inverse cumulative distribution function.public IndependentIncrementsInterface getCloneWithModifiedSeed(int seed)
IndependentIncrementsInterfacegetCloneWithModifiedSeed in interface IndependentIncrementsInterfaceseed - New value for the seed.public IndependentIncrementsInterface getCloneWithModifiedTimeDiscretization(TimeDiscretizationInterface newTimeDiscretization)
IndependentIncrementsInterfacegetCloneWithModifiedTimeDiscretization in interface IndependentIncrementsInterfacenewTimeDiscretization - New time discretizationpublic RandomVariableInterface getIncrement(int timeIndex, int factor)
IndependentIncrementsInterfacegetIncrement in interface IndependentIncrementsInterfacetimeIndex - The time index (corresponding to the this class's time discretization)factor - The index of the factor (independent scalar increment)public TimeDiscretizationInterface getTimeDiscretization()
IndependentIncrementsInterfacegetTimeDiscretization in interface IndependentIncrementsInterfacepublic int getNumberOfFactors()
IndependentIncrementsInterfacegetNumberOfFactors in interface IndependentIncrementsInterfacepublic int getNumberOfPaths()
IndependentIncrementsInterfacegetNumberOfPaths in interface IndependentIncrementsInterfacepublic RandomVariableInterface getRandomVariableForConstant(double value)
IndependentIncrementsInterfacegetRandomVariableForConstant in interface IndependentIncrementsInterfacevalue - The constant value to be used for initialized the random variable.public int getSeed()
Copyright © 2017. All rights reserved.