public class Rainflow extends Histogram
This implementation uses no exceptions to determine the residuum values. That means every closed hysterese will be counted.
There are other methods described in the book of Erwin Haibach / Betriebsfestigkeit 2. Auflage Chapter 3.3.4. A cycle that uses the whole range of the classes is counted when no subcycles are in there only.
Histogram
,
Serialized FormHistogram.Extrema
INCREASE, isClassMaximumValid, isClassMinimumValid, parameters
Constructor and Description |
---|
Rainflow() |
Rainflow(double[] values,
double min,
double max)
Build the rainflow obejct using double values.
|
Rainflow(float[] values,
double min,
double max)
Build the rainflow obejct using float values.
|
Rainflow(int[] values,
double min,
double max)
Build the rainflow obejct using int values.
|
Rainflow(long[] values,
double min,
double max)
Build the rainflow obejct using long values.
|
Rainflow(short[] values,
double min,
double max)
Build the rainflow obejct using short values.
|
Modifier and Type | Method and Description |
---|---|
protected int |
addResiduum(int resCount,
int clazz)
Add an index value to the residuum vector.
|
protected int |
analizeStartMax(int[][] histogram,
short[] arr,
int[] extrema,
int start,
int limit)
Do the counting of the classified data.
|
protected int |
analizeStartMin(int[][] histogram,
short[] arr,
int[] extrema,
int start,
int limit)
Do the counting of the classified data.
|
void |
calculate()
calculate the rainflow matrix.
|
protected void |
count(short[] arr,
int[] extrema,
boolean startsWithMaximum)
Do the counting of the classified data.
|
int |
getCycleCount()
Get the total number of cycle counts.
|
int[][] |
getMatrix()
Get the histogram matrix.
|
int |
getMaxValue()
Get the maximum value.
|
short[] |
getResiduum()
Get the residuum values.
|
static void |
main(java.lang.String[] args)
The main testing method.
|
java.lang.String |
toString() |
java.lang.String |
valuesToString(short[] arr)
Print out a line of array.
|
getClasses, getClasses, getClasses, getClasses, getClasses, getClassMaximum, getClassMinimum, getFilterWidthRelative, getMaximum, getMinimum, getNumberOfBins, getParameters, getUnit, setClassMaximum, setClassMinimum, setFilterWidthRelative, setMaximum, setMinimum, setNumberOfBins, setParameters, setUnit
public Rainflow()
public Rainflow(double[] values, double min, double max)
values
- the value.min
- the minimum of the values,
if maximum and minimum is equal the method will determine it again.max
- the maximum of the values,
if maximum and minimum is equal the method will determine it again.public Rainflow(float[] values, double min, double max)
values
- the value.min
- the minimum of the values,
if maximum and minimum is equal the method will determine it again.max
- the maximum of the values,
if maximum and minimum is equal the method will determine it again.public Rainflow(long[] values, double min, double max)
values
- the value.min
- the minimum of the values,
if maximum and minimum is equal the method will determine it again.max
- the maximum of the values,
if maximum and minimum is equal the method will determine it again.public Rainflow(int[] values, double min, double max)
values
- the value.min
- the minimum of the values,
if maximum and minimum is equal the method will determine it again.max
- the maximum of the values,
if maximum and minimum is equal the method will determine it again.public Rainflow(short[] values, double min, double max)
values
- the value.min
- the minimum of the values,
if maximum and minimum is equal the method will determine it again.max
- the maximum of the values,
if maximum and minimum is equal the method will determine it again.public void calculate()
protected void count(short[] arr, int[] extrema, boolean startsWithMaximum)
arr
- the classified data.extrema
- the local extrema of the data.startsWithMaximum
- if counting starts at maximumprotected int analizeStartMax(int[][] histogram, short[] arr, int[] extrema, int start, int limit)
histogram
- the array that hold the matrixarr
- the classified data.extrema
- the local extrema of the data.start
- the starting point index.limit
- the end point index.protected int analizeStartMin(int[][] histogram, short[] arr, int[] extrema, int start, int limit)
histogram
- the array that hold the matrixarr
- the classified data.extrema
- the local extrema of the data.start
- the starting point index.limit
- the end point index.public short[] getResiduum()
public int[][] getMatrix()
public int getMaxValue()
public int getCycleCount()
protected int addResiduum(int resCount, int clazz)
resCount
- the residuum index.clazz
- the index value.the
- increased residuum indexpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String valuesToString(short[] arr)
arr
- the arraypublic static void main(java.lang.String[] args)
args
- the command line arguments (never used).