Class DoubleArrayListParameter
- java.lang.Object
-
- elki.utilities.optionhandling.parameters.AbstractParameter<P,T>
-
- elki.utilities.optionhandling.parameters.ListParameter<DoubleArrayListParameter,java.util.List<double[]>>
-
- elki.utilities.optionhandling.parameters.DoubleArrayListParameter
-
- All Implemented Interfaces:
Parameter<java.util.List<double[]>>
public class DoubleArrayListParameter extends ListParameter<DoubleArrayListParameter,java.util.List<double[]>>
Parameter class for a parameter specifying a list of vectors.- Since:
- 0.1
- Author:
- Steffi Wanka, Erich Schubert
-
-
Field Summary
-
Fields inherited from class elki.utilities.optionhandling.parameters.ListParameter
LIST_SEP, SPLIT, VECTOR_SEP, VECTOR_SPLIT
-
Fields inherited from class elki.utilities.optionhandling.parameters.AbstractParameter
constraints, defaultValue, givenValue, optionalParameter, optionid
-
-
Constructor Summary
Constructors Constructor Description DoubleArrayListParameter(OptionID optionID)Constructs a vector list parameter with the given name and description.DoubleArrayListParameter(OptionID optionID, ParameterConstraint<java.util.List<double[]>> constraint)Constructs a vector list parameter with the given name and description.DoubleArrayListParameter(OptionID optionID, ParameterConstraint<java.util.List<double[]>> constraint, java.util.List<double[]> defaultValue)Constructs a vector list parameter with the given name and description.DoubleArrayListParameter(OptionID optionID, java.util.List<double[]> defaultValue)Constructs a vector list parameter with the given name and description.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDefaultValueAsString()Get the default value as string.java.lang.StringgetSyntax()Returns a string representation of the parameter's type.java.lang.StringgetValueAsString()Get the value as string.booleangrab(Parameterization config, java.util.function.Consumer<java.util.List<double[]>> consumer)Get the parameter.protected java.util.List<double[]>parseValue(java.lang.Object obj)Parse a given value into the destination type.intsize()Size of the list.-
Methods inherited from class elki.utilities.optionhandling.parameters.AbstractParameter
addConstraint, describeValues, getConstraints, getDefaultValue, getOptionID, getValue, hasDefaultValue, isDefined, isOptional, isValid, setDefaultValue, setOptional, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, validate
-
-
-
-
Constructor Detail
-
DoubleArrayListParameter
public DoubleArrayListParameter(OptionID optionID, ParameterConstraint<java.util.List<double[]>> constraint, java.util.List<double[]> defaultValue)
Constructs a vector list parameter with the given name and description.- Parameters:
optionID- Option IDconstraint- ConstraintdefaultValue- Default value
-
DoubleArrayListParameter
public DoubleArrayListParameter(OptionID optionID, ParameterConstraint<java.util.List<double[]>> constraint)
Constructs a vector list parameter with the given name and description.- Parameters:
optionID- Option IDconstraint- Constraint
-
DoubleArrayListParameter
public DoubleArrayListParameter(OptionID optionID, java.util.List<double[]> defaultValue)
Constructs a vector list parameter with the given name and description.- Parameters:
optionID- Option IDdefaultValue- Default value
-
DoubleArrayListParameter
public DoubleArrayListParameter(OptionID optionID)
Constructs a vector list parameter with the given name and description.- Parameters:
optionID- Option ID
-
-
Method Detail
-
getValueAsString
public java.lang.String getValueAsString()
Description copied from interface:ParameterGet the value as string. May returnnull- Returns:
- Value as string
-
getDefaultValueAsString
public java.lang.String getDefaultValueAsString()
Description copied from interface:ParameterGet the default value as string.- Specified by:
getDefaultValueAsStringin interfaceParameter<java.util.List<double[]>>- Overrides:
getDefaultValueAsStringin classAbstractParameter<DoubleArrayListParameter,java.util.List<double[]>>- Returns:
- default value
-
parseValue
protected java.util.List<double[]> parseValue(java.lang.Object obj) throws ParameterExceptionDescription copied from class:AbstractParameterParse a given value into the destination type.- Specified by:
parseValuein classAbstractParameter<DoubleArrayListParameter,java.util.List<double[]>>- Parameters:
obj- Object to parse (may be a string representation!)- Returns:
- Parsed object
- Throws:
ParameterException- when the object cannot be parsed.
-
size
public int size()
Description copied from class:ListParameterSize of the list.- Specified by:
sizein classListParameter<DoubleArrayListParameter,java.util.List<double[]>>- Returns:
- Size
-
getSyntax
public java.lang.String getSyntax()
Returns a string representation of the parameter's type.- Returns:
- Syntax string
-
grab
public boolean grab(Parameterization config, java.util.function.Consumer<java.util.List<double[]>> consumer)
Get the parameter.- Parameters:
config- Parameterizationconsumer- Output consumer- Returns:
trueif valid
-
-