Package edu.cmu.tetrad.util
Class Parameters
java.lang.Object
edu.cmu.tetrad.util.Parameters
- All Implemented Interfaces:
TetradSerializable
,Serializable
Stores a list of named parameters with their values. Stores default values for known parameters. Returns a list of
parameters with their values, for the parameters whose values have been retrieved, using the toString method.
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the object value of the given parameter, looking up its default in the ParamDescriptions map.Returns the object value of the given parameter, using the given default.boolean
getBoolean
(String name) Returns the boolean value of the given parameter, looking up its default in the ParamDescriptions map.boolean
getBoolean
(String name, boolean defaultValue) Returns the boolean value of the given parameter, using the given default.double
Returns the double value of the given parameter, looking up its default in the ParamDescriptions map.double
Returns the object value of the given parameter, using the given default.int
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.int
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.long
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.long
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.int
getNumValues
(String name) Returns the number of values for the parameter.Returns the string value of the given parameter, looking up its default in the ParamDescriptions map.Returns the string value of the given parameter, using the given default.Object[]
Returns the values set for the given parameter.void
putAll
(Parameters parameters) static Parameters
void
Sets the given parameter to the given value.void
Sets the value(s) of the given parameter to a list of strings.void
Sets the given parameter to the given value.void
Sets the value(s) of the given parameter to a list of values.toString()
Returns a list of the parameters whose values were actually used in the course of the simulation.
-
Constructor Details
-
Parameters
public Parameters() -
Parameters
-
-
Method Details
-
serializableInstance
-
putAll
-
toString
Returns a list of the parameters whose values were actually used in the course of the simulation. -
getInt
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The integer value of this parameter.
-
getLong
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The long value of this parameter.
-
getBoolean
Returns the boolean value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The boolean value of this parameter.
-
getDouble
Returns the double value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name or the parameter.- Returns:
- The double value of this parameter.
-
getString
Returns the string value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name or the parameter.- Returns:
- The string value of this parameter.
-
get
Returns the object value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The object value of this parameter.
-
getInt
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The integer value of this parameter.
-
getLong
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name
- The name of the parameter.- Returns:
- The long value of this parameter.
-
getBoolean
Returns the boolean value of the given parameter, using the given default.- Parameters:
name
- The name of the parameter.- Returns:
- The boolean value of this parameter.
-
getDouble
Returns the object value of the given parameter, using the given default.- Parameters:
name
- The name of the parameter.- Returns:
- The double value of this parameter.
-
getString
Returns the string value of the given parameter, using the given default.- Parameters:
name
- The name of the parameter.- Returns:
- The string value of this parameter.
-
get
Returns the object value of the given parameter, using the given default.- Parameters:
name
- The name of the parameter.- Returns:
- The object value of this parameter.
-
getValues
Returns the values set for the given parameter. Usually of length 1.- Parameters:
name
- The name of the parameter.- Returns:
- The array of values.
-
set
Sets the value(s) of the given parameter to a list of strings.- Parameters:
name
- The name of the parameter.n
- A list of values for the parameter.
-
set
Sets the value(s) of the given parameter to a list of values.- Parameters:
name
- The name of the parameter.s
- A list of strings for the parameter.
-
getNumValues
Returns the number of values for the parameter.- Parameters:
name
- The name of the parameter.- Returns:
- The number of values set for that parameter.
-
set
Sets the given parameter to the given value.- Parameters:
name
- The name of the parameter.value
- The value of the parameter (a single value).
-
set
Sets the given parameter to the given value.- Parameters:
name
- The name of the parameter.value
- The value of the parameter (a single value).
-
getParametersNames
-