Class ParameterAggregation<E extends ParameterObject>

  • 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 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 double[] getParameter()
        Description copied from interface: ParameterObject
        Get the current parameter associated with the state of the objects.
        Specified by:
        getParameter in interface ParameterObject
        Returns:
        The parameter.
      • setParameter

        public void setParameter​(double[] parameter)
        Description copied from interface: ParameterObject
        Set the current parameter and change the state of the objects.
        Specified by:
        setParameter in interface ParameterObject
        Parameters:
        parameter - The parameter associated with the new state of the objects.
      • getObjectsToModifyForParameter

        public Map<E,​double[]> getObjectsToModifyForParameter​(double[] parameter)