Class ChainedParameterization

  • All Implemented Interfaces:
    Parameterization

    public class ChainedParameterization
    extends AbstractParameterization
    Class that allows chaining multiple parameterizations. This is designed to allow overriding of some parameters for an algorithm, while other can be configured via different means, e.g., given by the user on the command line.

    See elki.utilities.optionhandling package documentation for examples.

    Since:
    0.3
    Author:
    Erich Schubert
    • Constructor Detail

      • ChainedParameterization

        public ChainedParameterization​(Parameterization... ps)
        Constructor that takes a number of Parameterizations to chain.
        Parameters:
        ps - Parameterizations
    • Method Detail

      • appendParameterization

        public void appendParameterization​(Parameterization p)
        Append a new Parameterization to the chain.
        Parameters:
        p - Parameterization
      • setValueForOption

        public boolean setValueForOption​(Parameter<?> opt)
                                  throws ParameterException
        Description copied from interface: Parameterization
        Assign a value for an option, but not using default values and throwing exceptions on error.
        Parameters:
        opt - Parameter to set
        Returns:
        Success code
        Throws:
        ParameterException - on assignment errors.
      • hasUnusedParameters

        public boolean hasUnusedParameters()
        Description copied from interface: Parameterization
        Check for unused parameters
        Returns:
        true if at least one parameter was not consumed
      • errorsTo

        public void errorsTo​(Parameterization config)
        Set the error target, since there is no unique way where errors can be reported.
        Parameters:
        config - Parameterization to report errors to