Class RandomVariableUniqueVariableFactory
java.lang.Object
net.finmath.montecarlo.AbstractRandomVariableFactory
net.finmath.montecarlo.automaticdifferentiation.backward.alternative.RandomVariableUniqueVariableFactory
- All Implemented Interfaces:
Serializable, RandomVariableFactory
- Version:
- 1.0
- Author:
- Stefan Sedlmair
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionempty constructor: does nothing since all elements of this class are static! -
Method Summary
Modifier and TypeMethodDescriptioncreateRandomVariable(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.createRandomVariable(double time, double[] values, boolean isConstant) createRandomVariable(double time, double value, boolean isConstant) createRandomVariable(RandomVariable randomvariable) createRandomVariable(RandomVariable randomvariable, boolean isConstant, ArrayList<RandomVariableUniqueVariable> parentVariables, RandomVariableUniqueVariable.OperatorType parentOperatorType) Add an object ofRandomVariableto variable list at the index of the current ID and rises the current ID to the next one.intMethods inherited from class AbstractRandomVariableFactory
createRandomVariable, createRandomVariableArray, createRandomVariableMatrixMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface RandomVariableFactory
createRandomVariable
-
Constructor Details
-
RandomVariableUniqueVariableFactory
public RandomVariableUniqueVariableFactory()empty constructor: does nothing since all elements of this class are static!
-
-
Method Details
-
createRandomVariable
public RandomVariable createRandomVariable(RandomVariable randomvariable, boolean isConstant, ArrayList<RandomVariableUniqueVariable> parentVariables, RandomVariableUniqueVariable.OperatorType parentOperatorType) Add an object ofRandomVariableto variable list at the index of the current ID and rises the current ID to the next one.- Parameters:
randomvariable- object ofRandomVariableto add to ArrayList and return asRandomVariableUniqueVariableisConstant- boolean such that if true the derivative will be set to zeroparentVariables- List ofRandomVariableUniqueVariablethat are the parents of the new instanceparentOperatorType- Operator type- Returns:
- new instance of
RandomVariableUniqueVariable
-
createRandomVariable
-
createRandomVariable
-
createRandomVariable
-
createRandomVariable
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
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.
-
getListOfAllVariables
- Returns:
- ArrayList containing all Variables and Constants of the session in the JVM
-
getNumberOfEntriesInList
public int getNumberOfEntriesInList()- Returns:
- Number of Entries in the List
-