de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters
Class DistanceParameter<D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter<D,D>
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DistanceParameter<D>
Type Parameters:
D - Distance type

public class DistanceParameter<D extends Distance<D>>
extends Parameter<D,D>

Parameter class for a parameter specifying a double value.


Field Summary
(package private)  D dist
          Distance type
 
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
constraints, defaultValue, givenValue, optionalParameter, optionid, shortDescription
 
Constructor Summary
DistanceParameter(OptionID optionID, D dist)
          Constructs a double parameter with the given optionID.
DistanceParameter(OptionID optionID, D dist, boolean optional)
          Constructs a double parameter with the given optionID and optional flag.
DistanceParameter(OptionID optionID, D dist, D defaultValue)
          Constructs a double parameter with the given optionID and default value.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist)
          Constructs a double parameter with the given optionID.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, boolean optional)
          Constructs a double parameter with the given optionID and optional flag.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, D defaultValue)
          Constructs a double parameter with the given optionID and default value.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, List<ParameterConstraint<D>> constraints)
          Constructs a double parameter with the given optionID, and parameter constraints.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, List<ParameterConstraint<D>> cons, boolean optional)
          Constructs a double parameter with the given optionID, parameter constraints, and optional flag.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, List<ParameterConstraint<D>> cons, D defaultValue)
          Constructs a double parameter with the given optionID, parameter constraints, and default value.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, ParameterConstraint<D> constraint)
          Constructs a double parameter with the given optionID, and parameter constraint.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, ParameterConstraint<D> constraint, boolean optional)
          Constructs a double parameter with the given optionID, parameter constraint, and optional flag.
DistanceParameter(OptionID optionID, DistanceFunction<?,D> dist, ParameterConstraint<D> constraint, D defaultValue)
          Constructs a double parameter with the given optionID, parameter constraint, and default value.
DistanceParameter(OptionID optionID, D dist, List<ParameterConstraint<D>> constraints)
          Constructs a double parameter with the given optionID, and parameter constraints.
DistanceParameter(OptionID optionID, D dist, List<ParameterConstraint<D>> cons, boolean optional)
          Constructs a double parameter with the given optionID, parameter constraints, and optional flag.
DistanceParameter(OptionID optionID, D dist, List<ParameterConstraint<D>> cons, D defaultValue)
          Constructs a double parameter with the given optionID, parameter constraints, and default value.
DistanceParameter(OptionID optionID, D dist, ParameterConstraint<D> constraint)
          Constructs a double parameter with the given optionID, and parameter constraint.
DistanceParameter(OptionID optionID, D dist, ParameterConstraint<D> constraint, boolean optional)
          Constructs a double parameter with the given optionID, parameter constraint, and optional flag.
DistanceParameter(OptionID optionID, D dist, ParameterConstraint<D> constraint, D defaultValue)
          Constructs a double parameter with the given optionID, parameter constraint, and default value.
 
Method Summary
 String getSyntax()
          Returns a string representation of the parameter's type.
 String getValueAsString()
          Get the value as string.
protected  D parseValue(Object obj)
          Parse a given value into the destination type.
 
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.Parameter
addConstraint, getDefaultValue, getDefaultValueAsString, getFullDescription, getGivenValue, getName, getOptionID, getShortDescription, getValue, getValuesDescription, hasDefaultValue, hasValuesDescription, isDefined, isOptional, isValid, setDefaultValue, setOptional, setShortDescription, setValue, setValueInternal, tookDefaultValue, tryDefaultValue, useDefaultValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dist

D extends Distance<D> dist
Distance type

Constructor Detail

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         List<ParameterConstraint<D>> cons,
                         D defaultValue)
Constructs a double parameter with the given optionID, parameter constraints, and default value.

Parameters:
optionID - the unique optionID
dist - distance factory
cons - a list of parameter constraints for this double parameter
defaultValue - the default value for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         List<ParameterConstraint<D>> cons,
                         D defaultValue)
Constructs a double parameter with the given optionID, parameter constraints, and default value.

Parameters:
optionID - the unique optionID
dist - distance factory
cons - a list of parameter constraints for this double parameter
defaultValue - the default value for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         List<ParameterConstraint<D>> cons,
                         boolean optional)
Constructs a double parameter with the given optionID, parameter constraints, and optional flag.

Parameters:
optionID - the unique optionID
dist - distance factory
cons - a list of parameter constraints for this double parameter
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         List<ParameterConstraint<D>> cons,
                         boolean optional)
Constructs a double parameter with the given optionID, parameter constraints, and optional flag.

Parameters:
optionID - the unique optionID
dist - distance factory
cons - a list of parameter constraints for this double parameter
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         List<ParameterConstraint<D>> constraints)
Constructs a double parameter with the given optionID, and parameter constraints.

Parameters:
optionID - the unique optionID
dist - distance factory
constraints - a list of parameter constraints for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         List<ParameterConstraint<D>> constraints)
Constructs a double parameter with the given optionID, and parameter constraints.

Parameters:
optionID - the unique optionID
dist - distance factory
constraints - a list of parameter constraints for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         ParameterConstraint<D> constraint,
                         D defaultValue)
Constructs a double parameter with the given optionID, parameter constraint, and default value.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter
defaultValue - the default value for this parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         ParameterConstraint<D> constraint,
                         D defaultValue)
Constructs a double parameter with the given optionID, parameter constraint, and default value.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter
defaultValue - the default value for this parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         ParameterConstraint<D> constraint,
                         boolean optional)
Constructs a double parameter with the given optionID, parameter constraint, and optional flag.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         ParameterConstraint<D> constraint,
                         boolean optional)
Constructs a double parameter with the given optionID, parameter constraint, and optional flag.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         ParameterConstraint<D> constraint)
Constructs a double parameter with the given optionID, and parameter constraint.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         ParameterConstraint<D> constraint)
Constructs a double parameter with the given optionID, and parameter constraint.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
constraint - the constraint of this parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         D defaultValue)
Constructs a double parameter with the given optionID and default value.

Parameters:
optionID - the unique optionID
dist - distance factory
defaultValue - the default value for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         D defaultValue)
Constructs a double parameter with the given optionID and default value.

Parameters:
optionID - the unique optionID
dist - distance factory
defaultValue - the default value for this double parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist,
                         boolean optional)
Constructs a double parameter with the given optionID and optional flag.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist,
                         boolean optional)
Constructs a double parameter with the given optionID and optional flag.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
optional - specifies whether this parameter is an optional parameter

DistanceParameter

public DistanceParameter(OptionID optionID,
                         D dist)
Constructs a double parameter with the given optionID.

Parameters:
optionID - the unique id of this parameter
dist - distance factory

DistanceParameter

public DistanceParameter(OptionID optionID,
                         DistanceFunction<?,D> dist)
Constructs a double parameter with the given optionID.

Parameters:
optionID - the unique id of this parameter
dist - distance factory
Method Detail

getValueAsString

public String getValueAsString()
Description copied from class: Parameter
Get the value as string. May return null

Specified by:
getValueAsString in class Parameter<D extends Distance<D>,D extends Distance<D>>
Returns:
Value as string

parseValue

protected D parseValue(Object obj)
                                    throws WrongParameterValueException
Description copied from class: Parameter
Parse a given value into the destination type.

Specified by:
parseValue in class Parameter<D extends Distance<D>,D extends Distance<D>>
Parameters:
obj - Object to parse (may be a string representation!)
Returns:
Parsed object
Throws:
WrongParameterValueException

getSyntax

public String getSyntax()
Returns a string representation of the parameter's type.

Specified by:
getSyntax in class Parameter<D extends Distance<D>,D extends Distance<D>>
Returns:
"<distance>"

Release 0.4.0 (2011-09-20_1324)