public class BrownianMotionView extends Object implements BrownianMotion
BrownianMotion
.Constructor and Description |
---|
BrownianMotionView(BrownianMotion brownianMotion,
Integer[] factors)
Create a sub-view on a Brownian motion.
|
Modifier and Type | Method and Description |
---|---|
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.
|
TimeDiscretization |
getTimeDiscretization()
Returns the time discretization used for this set of time-discrete Brownian increments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBrownianIncrement
getIncrement
public BrownianMotionView(BrownianMotion brownianMotion, Integer[] factors)
BrownianMotion
, i.e. a Brownian motion,
which maps factor indices to possilby other factors of the given Brownian motion.
You may use this class to change the number of factors and/or the order.brownianMotion
- A given Brownian motion.factors
- A map of indices i → j for i = 0,1,2,3,... given as an array of j'spublic RandomVariable getBrownianIncrement(int timeIndex, int factor)
BrownianMotion
getBrownianIncrement
in interface BrownianMotion
timeIndex
- The time index (corresponding to the this class's time discretization).factor
- The index of the factor (independent scalar Brownian increment).public TimeDiscretization getTimeDiscretization()
BrownianMotion
getTimeDiscretization
in interface BrownianMotion
getTimeDiscretization
in interface IndependentIncrements
public int getNumberOfFactors()
BrownianMotion
getNumberOfFactors
in interface BrownianMotion
getNumberOfFactors
in interface IndependentIncrements
public int getNumberOfPaths()
BrownianMotion
getNumberOfPaths
in interface BrownianMotion
getNumberOfPaths
in interface IndependentIncrements
public RandomVariable getRandomVariableForConstant(double value)
BrownianMotion
getRandomVariableForConstant
in interface BrownianMotion
getRandomVariableForConstant
in interface IndependentIncrements
value
- The constant value to be used for initialized the random variable.public BrownianMotion getCloneWithModifiedSeed(int seed)
BrownianMotion
getCloneWithModifiedSeed
in interface BrownianMotion
getCloneWithModifiedSeed
in interface IndependentIncrements
seed
- New value for the seed.public BrownianMotion getCloneWithModifiedTimeDiscretization(TimeDiscretization newTimeDiscretization)
BrownianMotion
getCloneWithModifiedTimeDiscretization
in interface BrownianMotion
getCloneWithModifiedTimeDiscretization
in interface IndependentIncrements
newTimeDiscretization
- New time discretizationpublic RandomVariable getIncrement(int timeIndex, int factor)
IndependentIncrements
getIncrement
in interface IndependentIncrements
timeIndex
- 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.