public class ChainedParameterization extends AbstractParameterization
de.lmu.ifi.dbs.elki.utilities.optionhandling
package documentation
for examples.Modifier and Type | Field and Description |
---|---|
private Vector<Parameterization> |
chain
Keep the list of parameterizations.
|
private Parameterization |
errorTarget
Error target
|
errors
Constructor and Description |
---|
ChainedParameterization(Parameterization... ps)
Constructor that takes a number of Parameterizations to chain.
|
Modifier and Type | Method and Description |
---|---|
void |
appendParameterization(Parameterization p)
Append a new Parameterization to the chain.
|
Parameterization |
descend(Object option)
Descend parameterization tree into sub-option.
|
void |
errorsTo(Parameterization config)
Set the error target, since there is no unique way where
errors can be reported.
|
boolean |
hasUnusedParameters()
Check for unused parameters
|
void |
reportError(ParameterException e)
Report a configuration error.
|
boolean |
setValueForOption(Parameter<?,?> opt)
Perform the actual parameter assignment.
|
checkConstraint, clearErrors, failOnErrors, finalize, getErrors, grab, hasErrors, logAndClearReportedErrors, reportInternalParameterizationErrors, tryInstantiate, tryInstantiate
private Vector<Parameterization> chain
private Parameterization errorTarget
public ChainedParameterization(Parameterization... ps)
ps
- Parameterizationspublic void appendParameterization(Parameterization p)
p
- Parameterizationpublic boolean setValueForOption(Parameter<?,?> opt) throws ParameterException
AbstractParameterization
setValueForOption
in interface Parameterization
setValueForOption
in class AbstractParameterization
opt
- Option to be setParameterException
- on assignment errors.public boolean hasUnusedParameters()
Parameterization
true
if at least one parameter was not consumedpublic void errorsTo(Parameterization config)
config
- Parameterization to report errors topublic void reportError(ParameterException e)
reportError
in interface Parameterization
reportError
in class AbstractParameterization
e
- Destination to report errors topublic Parameterization descend(Object option)
ClassParameter.instantiateClass(de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.Parameterization)
.
You only need to call this when you want to expose the tree structure
without offering a class choice as parameter.
Parallel descend in all chains.option
- Option subtree