Package elki.gui.util
Class DynamicParameters
- java.lang.Object
-
- elki.gui.util.DynamicParameters
-
public class DynamicParameters extends java.lang.ObjectWrapper around a set of parameters for ELKI, that may not yet be complete or correct.- Since:
- 0.3
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicParameters.NodeNode in the option tree (well, actually list)static classDynamicParameters.RemainingOptionsDummy option class that represents unhandled options
-
Field Summary
Fields Modifier and Type Field Description static intBIT_DEFAULT_VALUEBit for an option with a default valuestatic intBIT_INCOMPLETEBit for an option that should be setstatic intBIT_INVALIDBit for an option with an invalid valuestatic intBIT_OPTIONALBit for an optional valuestatic intBIT_SYNTAX_ERRORBit for an option containing an syntax errorprotected java.util.ArrayList<DynamicParameters.Node>parametersParameter storageprotected static OptionIDREMAINING_OPTIONS_IDOptionID for unrecognized options.static java.lang.StringSTRING_OPTIONALPseudo-value used in options that are optional, to unset.static java.lang.StringSTRING_USE_DEFAULTPseudo-value used in dropdowns for options that have a default value
-
Constructor Summary
Constructors Constructor Description DynamicParameters()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddParameter(Parameter<?> option, java.lang.String value, int bits, int depth)Add a single parameter to the listDynamicParameters.NodegetNode(int rowIndex)Get the node in this nth row of the flattened tree.voidserializeParameters(java.util.ArrayList<java.lang.String> p)Serialize parameters into an array list to pass to setParameters()intsize()Get the sizevoidupdateFromTrackParameters(TrackParameters track)Update the Parameter list from the collected options of an ELKI context
-
-
-
Field Detail
-
BIT_INCOMPLETE
public static final int BIT_INCOMPLETE
Bit for an option that should be set- See Also:
- Constant Field Values
-
BIT_INVALID
public static final int BIT_INVALID
Bit for an option with an invalid value- See Also:
- Constant Field Values
-
BIT_SYNTAX_ERROR
public static final int BIT_SYNTAX_ERROR
Bit for an option containing an syntax error- See Also:
- Constant Field Values
-
BIT_OPTIONAL
public static final int BIT_OPTIONAL
Bit for an optional value- See Also:
- Constant Field Values
-
BIT_DEFAULT_VALUE
public static final int BIT_DEFAULT_VALUE
Bit for an option with a default value- See Also:
- Constant Field Values
-
STRING_USE_DEFAULT
public static final java.lang.String STRING_USE_DEFAULT
Pseudo-value used in dropdowns for options that have a default value- See Also:
- Constant Field Values
-
STRING_OPTIONAL
public static final java.lang.String STRING_OPTIONAL
Pseudo-value used in options that are optional, to unset.- See Also:
- Constant Field Values
-
parameters
protected java.util.ArrayList<DynamicParameters.Node> parameters
Parameter storage
-
REMAINING_OPTIONS_ID
protected static OptionID REMAINING_OPTIONS_ID
OptionID for unrecognized options.
-
-
Method Detail
-
size
public int size()
Get the size- Returns:
- number of parameters
-
updateFromTrackParameters
public void updateFromTrackParameters(TrackParameters track)
Update the Parameter list from the collected options of an ELKI context- Parameters:
track- Tracked Parameters
-
addParameter
public void addParameter(Parameter<?> option, java.lang.String value, int bits, int depth)
Add a single parameter to the list- Parameters:
option- Optionvalue- Valuebits- Bitsdepth- Depth
-
serializeParameters
public void serializeParameters(java.util.ArrayList<java.lang.String> p)
Serialize parameters into an array list to pass to setParameters()- Parameters:
p- Output list (will not be emptied)
-
getNode
public DynamicParameters.Node getNode(int rowIndex)
Get the node in this nth row of the flattened tree.- Parameters:
rowIndex- row index- Returns:
- tree node
-
-