java.lang.Object
net.finmath.montecarlo.AbstractRandomVariableFactory
net.finmath.montecarlo.RandomVariableFromArrayFactory
- All Implemented Interfaces:
Serializable
,RandomVariableFactory
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
ConstructorsConstructorDescriptionRandomVariableFromArrayFactory(boolean isUseDoublePrecisionFloatingPointImplementation)
-
Method Summary
Modifier and TypeMethodDescriptioncreateRandomVariable(double value)
Create a (deterministic) random variable from a constant.createRandomVariable(double time, double value)
Create a (deterministic) random variable from a constant using a specific filtration time.createRandomVariable(double time, double[] values)
Create a random variable from an array using a specific filtration time.toString()
Methods inherited from class net.finmath.montecarlo.AbstractRandomVariableFactory
createRandomVariableArray, createRandomVariableMatrix
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.finmath.montecarlo.RandomVariableFactory
createRandomVariable
-
Constructor Details
-
RandomVariableFromArrayFactory
public RandomVariableFromArrayFactory() -
RandomVariableFromArrayFactory
public RandomVariableFromArrayFactory(boolean isUseDoublePrecisionFloatingPointImplementation)
-
-
Method Details
-
createRandomVariable
Description copied from interface:RandomVariableFactory
Create a (deterministic) random variable from a constant.- Specified by:
createRandomVariable
in interfaceRandomVariableFactory
- Overrides:
createRandomVariable
in classAbstractRandomVariableFactory
- Parameters:
value
- A constant value.- Returns:
- The
RandomVariable
.
-
createRandomVariable
Description copied from interface:RandomVariableFactory
Create a (deterministic) random variable from a constant using a specific filtration time.- Specified by:
createRandomVariable
in interfaceRandomVariableFactory
- Specified by:
createRandomVariable
in classAbstractRandomVariableFactory
- Parameters:
time
- The filtration time of the random variable.value
- A constant value.- Returns:
- The
RandomVariable
.
-
createRandomVariable
Description copied from interface:RandomVariableFactory
Create a random variable from an array using a specific filtration time.- Specified by:
createRandomVariable
in interfaceRandomVariableFactory
- Specified by:
createRandomVariable
in 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
.
-
toString
-