Package hec.hecmath
Class DurationPeriod
java.lang.Object
hec.hecmath.DurationPeriod
Class holds data for time series cyclic analysis statistic computed by HecMath.cyclicAnalysis
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classInner class used for sorting time points -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleandouble[]protected intprotected HecTimeprotected intprotected Stringprotected Stringprotected booleanprotected HecTimeprotected booleandouble[]protected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringstatic final intstatic final String[]static final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionDurationPeriod(int type, String startOfPeriod, String endOfPeriod) type - type of period (ANNUAL, QUARTERLY, MONTHLY, OTHER ) startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of periodDurationPeriod(String name, String startOfPeriod, String endOfPeriod) Contructor for user defined period types name - name for user defined duration period startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of period -
Method Summary
Modifier and TypeMethodDescriptionvoidrelease memorycompute(double[] xintervals, int horizontalAxis) Interpolate flow/stage duration result at probability intervaluesstatic double[]computeBinLimits(double[] values, int numberBins, boolean useLog) computeBins(double[] maxBinValue, double[] plottingPoints, int horizontalAxis) booleanCompute flow/stage duration array P = 100 * [ M / (n + 1) ] P = the probability that a given flow will be equaled or exceeded (% of time) M = the ranked position on the listing (dimensionless) n = the number of events for period of record (dimensionless)booleanFilter the time series for the times in the duration periodgetName()protected static double[]interpolate(double[] xValues, double[] yValues, double[] newXValues, int horizontalAxis) voidsetInterval(String interval) voidvoid
-
Field Details
-
UNDEFINED
public static final int UNDEFINED- See Also:
-
ANNUAL
public static final int ANNUAL- See Also:
-
QUARTERLY
public static final int QUARTERLY- See Also:
-
MONTHLY
public static final int MONTHLY- See Also:
-
OTHER
public static final int OTHER- See Also:
-
DURATION_PERIOD_STRINGS
-
_periodName
-
_periodInterval
-
_startOfPeriod
-
_endOfPeriod
-
_startDateBeforeEndDate
protected boolean _startDateBeforeEndDate -
_durationPeriodType
protected int _durationPeriodType -
_numberValues
protected int _numberValues -
_values
public double[] _values -
_durationPercent
public double[] _durationPercent -
_xunits
-
_yunits
-
_xtype
-
_ytype
-
_xparameterString
-
_yparameterString
-
_durationComputed
protected boolean _durationComputed -
_timeValid
protected boolean _timeValid
-
-
Constructor Details
-
DurationPeriod
type - type of period (ANNUAL, QUARTERLY, MONTHLY, OTHER ) startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of period -
DurationPeriod
Contructor for user defined period types name - name for user defined duration period startOfPeriod - date string of type "01JAN" (no year) defining beginning of period endOfPeriod - date string of type "31MAR" (no year) defining end of period
-
-
Method Details
-
filterTimeSeries
Filter the time series for the times in the duration period- Parameters:
tsc-- Returns:
- boolean
-
sortDescending
public void sortDescending() -
computeDuration
public boolean computeDuration()Compute flow/stage duration array P = 100 * [ M / (n + 1) ] P = the probability that a given flow will be equaled or exceeded (% of time) M = the ranked position on the listing (dimensionless) n = the number of events for period of record (dimensionless)- Returns:
-
computeBinLimits
public static double[] computeBinLimits(double[] values, int numberBins, boolean useLog) -
computeBins
public PairedDataContainer computeBins(double[] maxBinValue, double[] plottingPoints, int horizontalAxis) -
computeAll
-
compute
Interpolate flow/stage duration result at probability intervalues- Returns:
- PairedDataContainer object
-
interpolate
protected static double[] interpolate(double[] xValues, double[] yValues, double[] newXValues, int horizontalAxis) -
setName
-
getName
-
setInterval
-
getInterval
-
clearArrays
public void clearArrays()release memory
-