public class IncrementalMfd extends EvenlyDiscretizedFunc
| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultInfo |
protected String |
defaultName |
delta, first, maxX, minX, num, pointsC, D, toleranceinfo, name, xAxisName, yAxisName| Constructor and Description |
|---|
IncrementalMfd(double min,
double max,
int num,
boolean floats)
todo constructors
|
IncrementalMfd(double min,
int num,
double delta,
boolean floats)
todo constructors
|
| Modifier and Type | Method and Description |
|---|---|
static IncrementalMfd |
copyOf(IncrementalMfd mfd) |
double |
findMagJustAboveMomentRate(double moRate)
This finds the smallest magnitude such that all those less than and equal
to this have a cumulative moment rate less than that passed in.
|
boolean |
floats()
Returns whether ruptures generated using this MFD should float.
|
EvenlyDiscretizedFunc |
getCumMomentRateDist()
This returns the object of the class EvenlyDiscretizedFunc which contains
cumulative Moment Rate (the total moment rate for all points greater than
and equal to each mag)
|
double |
getCumRate(double mag)
This function finds the cumulative Rate at a specified magnitude (the rate
greater than and equal to that mag)
|
double |
getCumRate(int index)
This function finds the cumulative Rate at a specified index (the rate
greater than and equal to that index)
|
EvenlyDiscretizedFunc |
getCumRateDist()
This returns the object of the class EvenlyDiscretizedFunc which contains
all the points with Cum Rate Distribution (the rate greater than and equal
to each magnitude)
|
EvenlyDiscretizedFunc |
getCumRateDistWithOffset()
This returns the object of the class EvenlyDiscretizedFunc which contains
all the points with Cum Rate Distribution (the rate greater than and equal
to each magnitude).
|
String |
getDefaultInfo()
Returns the default Info String for the Distribution
|
String |
getDefaultName()
Returns the default Name for the Distribution
|
double |
getIncrRate(double mag)
This function finds IncrRate for the given magnitude
|
double |
getIncrRate(int index)
This function finds the IncrRate at the given index
|
String |
getInfo()
Returns the info of the distribution that user has set from outside, if it
is null then it returns the default info from the distribution.
|
double |
getMaxMagWithNonZeroRate()
This returns the maximum magnitude with a non-zero rate
|
double |
getMinMagWithNonZeroRate()
This returns the maximum magnitude with a non-zero rate
|
double |
getMomentRate(double mag)
This function finds the moment Rate at a specified magnitude
|
double |
getMomentRate(int index)
This function finds the moment Rate at a specified index
|
EvenlyDiscretizedFunc |
getMomentRateDist()
This returns the object of the class EvenlyDiscretizedFunc which contains
all the points with Moment Rate Distribution
|
double |
getTotalIncrRate()
This function returns the sum of all the incremental rate as the double
varibale
|
double |
getTotalMomentRate()
This function return the sum of all the moment rates as a double variable
|
String |
name()
Returns the Name of the Distribution that user has set from outside, if it
is null then it returns the default Name from the distribution.
|
void |
normalizeByTotalRate()
This function normalises the values of all the Incremental rate at each
point, by dividing each one by the totalIncrRate, so that after
normalization the sum addition of all incremental rate at each point comes
to be 1.
|
void |
scaleToCumRate(double mag,
double rate)
Using this function each data point is scaled to the ratio of the CumRate
at a given magnitude and the specified rate.
|
void |
scaleToCumRate(int index,
double rate)
Using this function each data point is scaled to the ratio of the CumRate
at a given index and the specified rate
|
void |
scaleToIncrRate(double mag,
double newRate)
Using this function each data point is scaled to the ratio of the IncrRate
at a given magnitude and the specified newRate
|
void |
scaleToIncrRate(int index,
double newRate)
Using this function each data point is scaled to the ratio of the IncrRate
at a given index and the specified newRate
|
void |
scaleToTotalMomentRate(double newTotMoRate)
Using this function each data point is scaled to ratio of specified
newTotalMomentRate and oldTotalMomentRate.
|
void |
setValuesAboveMomentRateToZero(double moRate)
This sets all y-axis values above the given total moment rate to zero.
|
void |
zeroAboveMag(double mag)
Sets the rate of all magnitudes above the supplied magnitude to 0.
|
void |
zeroAboveMag2(double mag) |
void |
zeroAtAndAboveMag(double mag)
Sets the rate of all magnitudes above the supplied magnitude to 0.
|
add, add, areAllXValuesInteger, clear, deepClone, equalXAndYValues, equalXValues, get, getClosestXIndex, getClosestY, getDelta, getFirstInterpolatedX_inLogXLogYDomain, getFirstInterpolatedX, getIndex, getInterpolatedY_inLogXLogYDomain, getInterpolatedY_inLogYDomain, getInterpolatedY, getMaxX, getMaxY, getMetadataString, getMinX, getMinY, getNum, getPointsIterator, getX, getXIndex, getY, getY, hasPoint, hasPoint, set, set, set, set, set, toString, withinTolerancecalcSumOfY_Vals, equals, getTolerance, scale, setTolerancegetClosestX, getXAxisName, getXValuesIterator, getYAxisName, getYValuesIterator, iterator, setInfo, setName, setXAxisName, setYAxisName, xValues, yValuesclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClosestX, getXAxisName, getXValuesIterator, getYAxisName, getYValuesIterator, setInfo, setName, setXAxisName, setYAxisName, xValues, yValuesforEach, iterator, spliteratorpublic IncrementalMfd(double min,
int num,
double delta,
boolean floats)
min - num - delta - using the parameters we call the parent class constructors to
initialise the parent class variablespublic IncrementalMfd(double min,
double max,
int num,
boolean floats)
min - max - num - using the min, max and num we calculate the deltapublic static IncrementalMfd copyOf(IncrementalMfd mfd)
public double getIncrRate(double mag)
mag - public double getIncrRate(int index)
index - public double getCumRate(double mag)
mag - public double getCumRate(int index)
index - public double getMomentRate(double mag)
mag - public double getMomentRate(int index)
index - public double getTotalMomentRate()
public double getTotalIncrRate()
public void normalizeByTotalRate()
public EvenlyDiscretizedFunc getCumRateDist()
public EvenlyDiscretizedFunc getCumRateDistWithOffset()
public EvenlyDiscretizedFunc getMomentRateDist()
public EvenlyDiscretizedFunc getCumMomentRateDist()
public void scaleToTotalMomentRate(double newTotMoRate)
newTotMoRate - public void scaleToCumRate(double mag,
double rate)
mag - rate - public void scaleToCumRate(int index,
double rate)
index - rate - public void scaleToIncrRate(double mag,
double newRate)
mag - newRate - public void scaleToIncrRate(int index,
double newRate)
index - newRate - public String getDefaultInfo()
public String getDefaultName()
public String name()
name in interface Namedname in class AbstractXY_DataSetpublic String getInfo()
getInfo in interface XY_DataSetgetInfo in class AbstractXY_DataSetpublic double getMinMagWithNonZeroRate()
public double getMaxMagWithNonZeroRate()
public void setValuesAboveMomentRateToZero(double moRate)
moRate - public double findMagJustAboveMomentRate(double moRate)
moRate - - in Nm/yrpublic void zeroAboveMag(double mag)
mag - TODO this is awful this assumes you know the (almost) exact
magnitude (wihtin tolerance) of a mag in the MFD; if you just pick
an arbitrary value, internally an index of -1 will be returned and
all values will be set to Zeropublic void zeroAboveMag2(double mag)
public void zeroAtAndAboveMag(double mag)
mag - public boolean floats()
true if ruptures should float, false otherwise