|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.param.AbstractParameter
org.opensha.sha.param.MagFreqDistParameter
public class MagFreqDistParameter
Title: MagFreqDistParameter
Description: Generic Parameter that contains a IncremnetalMagFreqDist and optionally a list of allowed values stored in a constraint object. If no constraint object is present then all MagFreDists are permitted
| Field Summary | |
|---|---|
static String |
ARB_INCR_PARAM_NAME
|
static String |
BVALUE_INFO
|
protected static String |
C
Class name for debugging. |
protected static boolean |
D
If true print out debug statements. |
static String |
DISTRIBUTION_NAME
the string for the distribution choice parameter |
static String |
FIX
|
static String |
FIX_INFO
|
static String |
FIX_RATE
|
static String |
FIX_TO_CUM_RATE
|
static String |
FIX_TOT_MO_RATE
|
static String |
GR_BVALUE
|
static String |
GR_MAG_LOWER
|
static String |
GR_MAG_LOWER_INFO
|
static String |
GR_MAG_UPPER
|
static String |
GR_MAG_UPPER_INFO
|
static String |
MAG
|
static String |
MAG_AND_MO_RATE
|
static String |
MAX
|
static String |
MAX_INFO
|
static String |
MEAN
Gaussian Magnitude Frequency Distribution Parameter string list constant |
static String |
MIN
Name and Info strings of params needed by all distributions |
static String |
MIN_INFO
|
static String |
MO_RATE
|
static String |
MO_RATE_UNITS
|
static String |
NONE
|
static String |
NUM
|
static String |
NUM_INFO
|
static String |
RATE
Single Magnitude Frequency Distribution Parameter names |
static String |
RATE_AND_MAG
|
static String |
RATE_AND_MO_RATE
|
static String |
RATE_UNITS
|
static String |
SET_ALL_PARAMS_BUT
|
static String |
SINGLE_PARAMS_TO_SET
|
static String |
STD_DEV
|
static String |
TAPERED_GR_CORNER_MAG
|
static String |
TAPERED_GR_CORNER_MAG_INFO
|
static String |
TOT_CUM_RATE
|
static String |
TOT_MO_RATE
Name, units, and info strings for parameters needed by more than one distribution (shared) |
static String |
TRUNCATE_NUM_OF_STD_DEV
|
static String |
TRUNCATE_ON_BOTH_SIDES
|
static String |
TRUNCATE_UPPER_ONLY
|
static String |
TRUNCATION_REQ
|
static String |
YC_DELTA_MAG_CHAR
Young and Coppersmith, 1985 Char dist. |
static String |
YC_DELTA_MAG_CHAR_INFO
|
static String |
YC_DELTA_MAG_PRIME
|
static String |
YC_DELTA_MAG_PRIME_INFO
|
static String |
YC_MAG_PRIME
|
static String |
YC_MAG_PRIME_INFO
|
static String |
YC_TOT_CHAR_RATE
|
static String |
YC_TOT_CHAR_RATE_INFO
|
| Fields inherited from class org.opensha.commons.param.AbstractParameter |
|---|
constraint, defaultValue, editable, independentParameters, info, metadataString, name, units, value, XML_COMPLEX_VAL_EL_NAME, XML_GROUP_METADATA_NAME, XML_METADATA_NAME, XML_NULL_VALUE |
| Fields inherited from interface org.opensha.commons.param.Parameter |
|---|
XML_INDEPENDENT_PARAMS_NAME |
| Constructor Summary | |
|---|---|
MagFreqDistParameter(String name)
No constraints specified, all MagFreqDists allowed. |
|
MagFreqDistParameter(String name,
ArrayList allowedMagDists)
Sets the name, defines the constraints as ArrayList of String values. |
|
MagFreqDistParameter(String name,
ArrayList allowedMagDists,
IncrementalMagFreqDist value)
Sets the name, and value. |
|
MagFreqDistParameter(String name,
IncrementalMagFreqDist value)
No constraints specified, all values allowed. |
|
MagFreqDistParameter(String name,
MagFreqDistConstraint constraint)
Sets the name and Constraints object. |
|
MagFreqDistParameter(String name,
MagFreqDistConstraint constraint,
IncrementalMagFreqDist value)
Sets the name, value and constraint. |
|
| Method Summary | |
|---|---|
Object |
clone()
Returns a copy so you can't edit or damage the origial. |
int |
compareTo(Object obj)
Compares the values to if this is less than, equal to, or greater than the comparing objects. |
boolean |
equals(Object obj)
Compares value to see if equal. |
ParameterList |
getAdjustableParams()
|
ArrayList |
getAllowedMagDists()
Gets array list of allowed MagFreqDists. |
EvenlyDiscretizedFuncParameter |
getArbIncrementalMagFreqDist()
Returns the EvenlyDiscretizedFuncParameter |
AbstractParameterEditorOld |
getEditor()
Returns the Editor for this Parameter. |
StringConstraint |
getGaussianDistSetAllButOptions()
|
StringConstraint |
getGRFixOptions()
|
StringConstraint |
getGRSetAllButOptions()
|
String |
getMetadataString()
This overrides the getmetadataString() method because the value here does not have an ASCII representation (and we need to know the values of the independent parameter instead). |
StringConstraint |
getSingleDistFixOptions()
Return the FIX and SET_ALL_PARAMS_BUT constraints for each dist |
StringConstraint |
getTapGRSetAllButOptions()
|
String |
getType()
Returns the type(full path with the classname) of the MagDist Classes |
StringConstraint |
getYCSetAllButOptions()
|
boolean |
isAllowed(IncrementalMagFreqDist d)
Uses the constraint object to determine if the new value being set is allowed. |
void |
setConstraint(ParameterConstraint constraint)
Sets the constraint if it is a StringConstraint and the parameter is currently editable. |
boolean |
setIndividualParamValueFromXML(Element el)
This should set the value of this individual parameter. |
void |
setMagDist()
set the IncrementalMagFreqDist object based on parameters given |
void |
setMagDist(ParameterList newParamList)
Updates the MagFreqDistParams with the new parameters. |
void |
setMagDistAsSummedMagDist(SummedMagFreqDist magDist,
String metadata)
Sets the MagDist as the Summed MagDist. |
void |
setSummedDistPlotted(boolean sumDistPlotted)
Sets the Summed Dist plotted to be false or true based on |
void |
setValue(IncrementalMagFreqDist value)
Set's the parameter's value. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String C
protected static final boolean D
public static final String DISTRIBUTION_NAME
public static final String MIN
public static final String MIN_INFO
public static final String MAX
public static final String MAX_INFO
public static final String NUM
public static final String NUM_INFO
public static final String TOT_MO_RATE
public static final String MO_RATE_UNITS
public static final String TOT_CUM_RATE
public static final String RATE_UNITS
public static final String GR_MAG_UPPER
public static final String GR_MAG_UPPER_INFO
public static final String GR_MAG_LOWER
public static final String GR_MAG_LOWER_INFO
public static final String GR_BVALUE
public static final String BVALUE_INFO
public static final String SET_ALL_PARAMS_BUT
public static final String FIX
public static final String FIX_INFO
public static final String FIX_TOT_MO_RATE
public static final String FIX_TO_CUM_RATE
public static final String FIX_RATE
public static final String RATE
public static final String MAG
public static final String MO_RATE
public static final String SINGLE_PARAMS_TO_SET
public static final String RATE_AND_MAG
public static final String MAG_AND_MO_RATE
public static final String RATE_AND_MO_RATE
public static final String YC_DELTA_MAG_CHAR
public static final String YC_DELTA_MAG_CHAR_INFO
public static final String YC_MAG_PRIME
public static final String YC_MAG_PRIME_INFO
public static final String YC_DELTA_MAG_PRIME
public static final String YC_DELTA_MAG_PRIME_INFO
public static final String YC_TOT_CHAR_RATE
public static final String YC_TOT_CHAR_RATE_INFO
public static final String MEAN
public static final String STD_DEV
public static final String TRUNCATION_REQ
public static final String TRUNCATE_UPPER_ONLY
public static final String TRUNCATE_ON_BOTH_SIDES
public static final String TRUNCATE_NUM_OF_STD_DEV
public static final String NONE
public static final String TAPERED_GR_CORNER_MAG
public static final String TAPERED_GR_CORNER_MAG_INFO
public static final String ARB_INCR_PARAM_NAME
| Constructor Detail |
|---|
public MagFreqDistParameter(String name)
name - Name of the parameter
public MagFreqDistParameter(String name,
ArrayList allowedMagDists)
throws ConstraintException
name - Name of the parameterallowedMagDists - ArrayList of allowed values
ConstraintException - thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed
public MagFreqDistParameter(String name,
MagFreqDistConstraint constraint)
throws ConstraintException
name - Name of the parameterconstraint - defines vector of allowed values
ConstraintException - thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed
public MagFreqDistParameter(String name,
IncrementalMagFreqDist value)
name - Name of the parametervalue - IncrementalMagFreqDist object
public MagFreqDistParameter(String name,
ArrayList allowedMagDists,
IncrementalMagFreqDist value)
throws ConstraintException
name - Name of the parametervalue - IncrementalMagFreqDist object of this parameterallowedMagDists - ArrayList of allowed Mag Dists
ConstraintException - thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed
public MagFreqDistParameter(String name,
MagFreqDistConstraint constraint,
IncrementalMagFreqDist value)
throws ConstraintException
name - Name of the parameterconstraint - vector of allowed Mag Distsvalue - IncrementalMagFreqDist object
ConstraintException - thrown if the value is not allowed
ConstraintException - Is thrown if the value is not allowed| Method Detail |
|---|
public void setConstraint(ParameterConstraint constraint)
throws ParameterException,
EditableException
setConstraint in interface ParametersetConstraint in class AbstractParameterconstraint - to set
ParameterException
EditableExceptionpublic ArrayList getAllowedMagDists()
public int compareTo(Object obj)
throws UnsupportedOperationException
compareTo in interface Comparableobj - The object to compare this to
ClassCastException - Is thrown if the comparing object is not
a DoubleParameter, or DoubleDiscreteParameter.
UnsupportedOperationException
public void setValue(IncrementalMagFreqDist value)
throws ConstraintException,
ParameterException
value - The new value for this Parameter
ParameterException - Thrown if the object is currenlty not
editable
ConstraintException - Thrown if the object value is not allowedpublic boolean isAllowed(IncrementalMagFreqDist d)
obj - Object to check if allowed via constraints
public boolean equals(Object obj)
throws UnsupportedOperationException
equals in interface Parameterequals in class AbstractParameterobj - The object to compare this to
ClassCastException - Is thrown if the comparing object is not
a DoubleParameter, or DoubleDiscreteParameter.
UnsupportedOperationException
public Object clone()
throws UnsupportedOperationException
clone in interface Parameterclone in class AbstractParameterUnsupportedOperationExceptionpublic String getType()
getType in interface ParametergetType in class AbstractParameterpublic ParameterList getAdjustableParams()
public EvenlyDiscretizedFuncParameter getArbIncrementalMagFreqDist()
public void setMagDist(ParameterList newParamList)
newParamList - Cloned Parameterlist
public void setMagDistAsSummedMagDist(SummedMagFreqDist magDist,
String metadata)
magDist - SummedMagFreqDistmetadata - Stringpublic void setSummedDistPlotted(boolean sumDistPlotted)
sumDistPlotted - booleanpublic void setMagDist()
public String getMetadataString()
getMetadataString in interface ParametergetMetadataString in class AbstractParameterpublic StringConstraint getSingleDistFixOptions()
public StringConstraint getGRSetAllButOptions()
public StringConstraint getGRFixOptions()
public StringConstraint getYCSetAllButOptions()
public StringConstraint getGaussianDistSetAllButOptions()
public StringConstraint getTapGRSetAllButOptions()
public boolean setIndividualParamValueFromXML(Element el)
AbstractParameter
setIndividualParamValueFromXML in class AbstractParameterpublic AbstractParameterEditorOld getEditor()
ParameterEditor for this Parameter. It is
recommended that editors be lazily instantiated.
getEditor in interface ParameterEditor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||