- java.lang.Object
-
- net.finmath.montecarlo.AbstractRandomVariableFactory
-
- net.finmath.montecarlo.RandomVariableFromArrayFactory
-
- All Implemented Interfaces:
Serializable,RandomVariableFactory
public class RandomVariableFromArrayFactory extends AbstractRandomVariableFactory
A factory (helper class) to create random variables. By changing the factory implementation used, you can (more or less globally) change which implementation of random variable is used.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RandomVariableFromArrayFactory()RandomVariableFromArrayFactory(boolean isUseDoublePrecisionFloatingPointImplementation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomVariablecreateRandomVariable(double value)Create a (deterministic) random variable from a constant.RandomVariablecreateRandomVariable(double time, double value)Create a (deterministic) random variable from a constant using a specific filtration time.RandomVariablecreateRandomVariable(double time, double[] values)Create a random variable from an array using a specific filtration time.StringtoString()-
Methods inherited from class net.finmath.montecarlo.AbstractRandomVariableFactory
createRandomVariableArray, createRandomVariableMatrix
-
-
-
-
Method Detail
-
createRandomVariable
public RandomVariable createRandomVariable(double value)
Description copied from interface:RandomVariableFactoryCreate a (deterministic) random variable from a constant.- Specified by:
createRandomVariablein interfaceRandomVariableFactory- Overrides:
createRandomVariablein classAbstractRandomVariableFactory- Parameters:
value- A constant value.- Returns:
- The
RandomVariable.
-
createRandomVariable
public RandomVariable createRandomVariable(double time, double value)
Description copied from interface:RandomVariableFactoryCreate a (deterministic) random variable from a constant using a specific filtration time.- Specified by:
createRandomVariablein interfaceRandomVariableFactory- Specified by:
createRandomVariablein classAbstractRandomVariableFactory- Parameters:
time- The filtration time of the random variable.value- A constant value.- Returns:
- The
RandomVariable.
-
createRandomVariable
public RandomVariable createRandomVariable(double time, double[] values)
Description copied from interface:RandomVariableFactoryCreate a random variable from an array using a specific filtration time.- Specified by:
createRandomVariablein interfaceRandomVariableFactory- Specified by:
createRandomVariablein classAbstractRandomVariableFactory- Parameters:
time- The filtration time of the random variable.values- Array representing values of the random variable at the sample paths.- Returns:
- The
RandomVariable.
-
-