|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.commons.data.estimate.Estimate
org.opensha.commons.data.estimate.DiscretizedFuncEstimate
public abstract class DiscretizedFuncEstimate
Title: DiscreteValueEstimate.java
Description: This can be used to specify probabilities associated with discrete values from a DiscretizedFunction. Use an EvenlyDiscretizedFunction for a continuous PDF (where it is asssumed that the first and last values are the first and last non-zero values, respectively), or use an ArbitrarilyDiscretizedFunction if the nonzero values are not evenly discretized.
Copyright: Copyright (c) 2002
Company:
| Field Summary | |
|---|---|
protected AbstractDiscretizedFunc |
cumDistFunc
|
protected ArbDiscrEmpiricalDistFunc |
func
|
protected double |
tol
|
| Fields inherited from class org.opensha.commons.data.estimate.Estimate |
|---|
comments, EST_MSG_FIRST_LAST_PROB_ZERO, EST_MSG_INVLID_RANGE, EST_MSG_MAX_LT_MIN, EST_MSG_NOT_NORMALIZED, EST_MSG_PROB_POSITIVE, EST_MSG_PROBS_NOT_INCREASING, FRACTILE_UNDEFINED, max, MEDIAN_UNDEFINED, min, MSG_ALL_PROB_ZERO, MSG_INVALID_STDDEV, units |
| Constructor Summary | |
|---|---|
DiscretizedFuncEstimate(AbstractDiscretizedFunc func,
boolean isNormalized)
Constructor - Accepts a DiscretizedFunc and an indication of whether it is normalized. |
|
| Method Summary | |
|---|---|
double |
getDiscreteFractile(double prob)
Get fractile for a given probability (the value where the CDF equals prob). |
double |
getFractile(double prob)
Get fractile for a given probability (the value where the CDF equals prob). |
AbstractDiscretizedFunc |
getFunc()
Get the function in which values are stored |
double |
getMean()
Get mean |
double |
getMedian()
Get the median which is same as fractile at probability of 0.5. |
double |
getMode()
Get the mode (X value where Y is maximum). |
double |
getStdDev()
Get standard deviation |
AbstractDiscretizedFunc |
getValues()
get the values and corresponding probabilities from this estimate |
boolean |
isMultiModal()
Whether the estimate has more than one mode |
void |
setTolerance(double tol)
This allows the user to set the tolerance used for checking normalization (and perhaps other things in subclasses). |
void |
setValues(AbstractDiscretizedFunc newFunc,
boolean isNormalized)
As implemented, the function passed in is cloned. |
String |
toString()
|
| Methods inherited from class org.opensha.commons.data.estimate.Estimate |
|---|
getCDF_Test, getCDF_TestUsingFractile, getComments, getMax, getMin, getName, getPDF_Test, getProbLessThanEqual, getUnits, isNegativeValuePresent, setComments, setUnits |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ArbDiscrEmpiricalDistFunc func
protected AbstractDiscretizedFunc cumDistFunc
protected double tol
| Constructor Detail |
|---|
public DiscretizedFuncEstimate(AbstractDiscretizedFunc func,
boolean isNormalized)
func - | Method Detail |
|---|
public String toString()
toString in class Estimate
public void setValues(AbstractDiscretizedFunc newFunc,
boolean isNormalized)
func - public AbstractDiscretizedFunc getValues()
public double getMode()
getMode in class Estimatepublic boolean isMultiModal()
public double getMedian()
getMedian in class Estimatepublic double getStdDev()
getStdDev in class Estimatepublic double getMean()
getMean in class Estimatepublic void setTolerance(double tol)
tol - doublepublic AbstractDiscretizedFunc getFunc()
public double getFractile(double prob)
getFractile in class Estimateprob -
public double getDiscreteFractile(double prob)
prob -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||