- All Known Subinterfaces:
RandomVariableDifferentiableFactory
- All Known Implementing Classes:
AbstractRandomVariableDifferentiableFactory
,AbstractRandomVariableFactory
,RandomVariableDifferentiableAADFactory
,RandomVariableDifferentiableADFactory
,RandomVariableFloatFactory
,RandomVariableFromArrayFactory
,RandomVariableLazyEvaluationFactory
public interface RandomVariableFactory
A factory for creating objects implementing
net.finmath.stochastic.RandomVariable
.
Use this interface in your implementations to allow dependency injection, i.e. to allow the use
of different implementations of net.finmath.stochastic.RandomVariable
whenever random variables
need to be constructed.- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateRandomVariable
(double value) Create a (deterministic) random variable from a constant.default RandomVariable
createRandomVariable
(double[] values) 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.createRandomVariableArray
(double[] values) Create an array of (deterministic) random variables from an array of constants.RandomVariable[][]
createRandomVariableMatrix
(double[][] values) Create a matrix of (deterministic) random variables from an matrix of constants.static RandomVariable
getRandomVariableOrDefault
(RandomVariableFactory randomVariableFactory, Object value, RandomVariable defaultValue) Static method for creating random variables from Objects.
-
Method Details
-
getRandomVariableOrDefault
static RandomVariable getRandomVariableOrDefault(RandomVariableFactory randomVariableFactory, Object value, RandomVariable defaultValue) Static method for creating random variables from Objects.- Parameters:
randomVariableFactory
- The RandomVariableFactory used to construct the random variable, if needed.value
- The value used to construct the random variable, if needed.defaultValue
- The default value to be used if value is null.- Returns:
- A RandomVariable with the given value (or the defaultValue).
-
createRandomVariable
Create a (deterministic) random variable from a constant.- Parameters:
value
- A constant value.- Returns:
- The
RandomVariable
.
-
createRandomVariable
Create a (deterministic) random variable from a constant using a specific filtration time.- Parameters:
time
- The filtration time of the random variable.value
- A constant value.- Returns:
- The
RandomVariable
.
-
createRandomVariable
Create a random variable from an array using a specific filtration time.- Parameters:
time
- The filtration time of the random variable.values
- Array representing values of the random variable at the sample paths.- Returns:
- The
RandomVariable
.
-
createRandomVariable
-
createRandomVariableArray
Create an array of (deterministic) random variables from an array of constants.- Parameters:
values
- Array representing constants.- Returns:
- The
RandomVariable
.
-
createRandomVariableMatrix
Create a matrix of (deterministic) random variables from an matrix of constants.- Parameters:
values
- Matrix representing constants.- Returns:
- The
RandomVariable
.
-