|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectparameters.Parameter
This class holds the value of a given parameter, its upper and lower bounds, and whether it should vary linearly or logarithmically. To hold sets of parameters, use the ParameterSet class. To hold the current state of the model, use the Parameters class. Note that this class only works well after a model is loaded.
Field Summary | |
static int |
LINEAR
|
static int |
LOGARITHMIC
|
float |
lowerBound
The highest value this parameter can every have. |
java.lang.String |
name
The name of this parameter. |
static int |
NOT_SET
|
float |
upperBound
The lowest value this parameter can every have. |
float |
value
The value of the parameter. |
int |
variationMode
Can be either LINEAR or LOGARITHMIC |
Constructor Summary | |
Parameter()
|
|
Parameter(Parameter p)
|
|
Parameter(java.lang.String n)
This initializer is for use when reading from a file, where the creation of this Parameter object will happen after the parameter name is already known. |
|
Parameter(java.lang.String n,
float v,
float u,
float l,
int vM)
|
Method Summary | |
Parameter |
copy()
|
java.lang.String |
getName()
|
float |
getValue()
|
int |
getVariationMode()
|
void |
loadParameters(BetterTokenizer tokenizer)
This loadParameters calls the other one with need_all = true |
void |
loadParameters(BetterTokenizer tokenizer,
boolean need_all)
This function is for loading parameters from a file. |
void |
setBounds(float l,
float u)
|
void |
setValue(float v)
|
void |
setVariationMode(int v)
|
void |
setVariationMode(java.lang.String mode)
|
java.lang.String |
toString()
|
java.lang.String |
toString(boolean printAll)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String name
public float value
public float upperBound
public float lowerBound
public int variationMode
public static final int LINEAR
public static final int LOGARITHMIC
public static final int NOT_SET
Constructor Detail |
public Parameter()
public Parameter(java.lang.String n)
public Parameter(java.lang.String n, float v, float u, float l, int vM)
public Parameter(Parameter p)
Method Detail |
public Parameter copy()
public void loadParameters(BetterTokenizer tokenizer) throws java.lang.Exception
java.lang.Exception
public void loadParameters(BetterTokenizer tokenizer, boolean need_all) throws java.lang.Exception
need_all
- true means value, min, and max all must be in file or exception thrown. false means only value needs to be there (but others are read if present).
java.lang.Exception
public java.lang.String toString()
public java.lang.String toString(boolean printAll)
public float getValue()
public void setValue(float v)
public void setBounds(float l, float u)
public void setVariationMode(int v)
public void setVariationMode(java.lang.String mode) throws java.lang.Exception
java.lang.Exception
public int getVariationMode()
public java.lang.String getName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |