Class ParameterAggregation<E extends ParameterObject>
java.lang.Object
net.finmath.marketdata.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
ConstructorsConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptionvoidAdd an object this parameterization.getCloneForParameter(double[] value) Create a clone with a modified parameter.getObjectsToModifyForParameter(double[] parameter) double[]Get the current parameter associated with the state of the objects.voidRemove an object from this parameterization.voidsetParameter(double[] parameter) Set the current parameter and change the state of the objects.
-
Constructor Details
-
ParameterAggregation
public ParameterAggregation()Create a collection of parametrized objects. -
ParameterAggregation
-
ParameterAggregation
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 Details
-
add
Add an object this parameterization.- Parameters:
parameterObject- The parameter object to add to this parameterization
-
remove
Remove an object from this parameterization.- Parameters:
parameterObject- The parameter object to remove.
-
getParameter
public double[] 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(double[] 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
-
getCloneForParameter
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.
-