Module net.finmath.lib
Class ParameterAggregation<E extends ParameterObject>
- java.lang.Object
-
- net.finmath.marketdata2.calibration.ParameterAggregation<E>
-
- Type Parameters:
E- A class implementing the ParameterObjectInterface
- All Implemented Interfaces:
ParameterObject
public class ParameterAggregation<E extends ParameterObject> extends Object implements ParameterObject
Combine a set of parameter vectors to a single parameter vector. The class is a little helper class which can combine a set of double[] parameter-vectors to a single large double[] parameter-vector. More precisely: this class combines a set of objects implementing ParameterObjectInterface to a single object by implementing ParameterObjectInterface with the combined parameter. An application is an optimization problem which depends on different parametrized objects, using a solver/optimizer which operates an a single parameter vector.- Version:
- 1.0
- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description ParameterAggregation()Create a collection of parametrized objects.ParameterAggregation(E[] parameters)Create a collection of parametrized objects.ParameterAggregation(Set<E> parameters)Create a collection of parametrized objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(E parameterObject)Add an object this parameterization.CurvegetCloneForParameter(RandomVariable[] value)Create a clone with a modified parameter.Map<E,RandomVariable[]>getObjectsToModifyForParameter(RandomVariable[] parameter)RandomVariable[]getParameter()Get the current parameter associated with the state of the objects.voidremove(E parameterObject)Remove an object from this parameterization.voidsetParameter(RandomVariable[] parameter)Set the current parameter and change the state of the objects.
-
-
-
Constructor Detail
-
ParameterAggregation
public ParameterAggregation()
Create a collection of parametrized objects.
-
ParameterAggregation
public ParameterAggregation(Set<E> parameters)
Create a collection of parametrized objects. The constructor will internally create a (shallow) copy of the set passed to it.- Parameters:
parameters- A set of objects implementing ParameterObjectInterface to be combined to a single object.
-
ParameterAggregation
public ParameterAggregation(E[] parameters)
Create a collection of parametrized objects. The constructor will internally create a (shallow) copy of the set passed to it.- Parameters:
parameters- A set of objects implementing ParameterObjectInterface to be combined to a single object.
-
-
Method Detail
-
add
public void add(E parameterObject)
Add an object this parameterization.- Parameters:
parameterObject- The parameter object to add to this parameterization
-
remove
public void remove(E parameterObject)
Remove an object from this parameterization.- Parameters:
parameterObject- The parameter object to remove.
-
getParameter
public RandomVariable[] getParameter()
Description copied from interface:ParameterObjectGet the current parameter associated with the state of the objects.- Specified by:
getParameterin interfaceParameterObject- Returns:
- The parameter.
-
setParameter
public void setParameter(RandomVariable[] parameter)
Description copied from interface:ParameterObjectSet the current parameter and change the state of the objects.- Specified by:
setParameterin interfaceParameterObject- Parameters:
parameter- The parameter associated with the new state of the objects.
-
getObjectsToModifyForParameter
public Map<E,RandomVariable[]> getObjectsToModifyForParameter(RandomVariable[] parameter)
-
getCloneForParameter
public Curve getCloneForParameter(RandomVariable[] value) throws CloneNotSupportedException
Description copied from interface:ParameterObjectCreate a clone with a modified parameter.- Specified by:
getCloneForParameterin interfaceParameterObject- Parameters:
value- The new parameter.- Returns:
- A clone with an otherwise modified parameter.
- Throws:
CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
-