|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sc.seis.fissuresUtil.bag.Statistics
public class Statistics
Statistics.java Created: Wed Apr 4 22:27:52 2001
| Field Summary | |
|---|---|
protected double[] |
autocorrelation
|
protected int |
beginIndex
|
protected double[] |
dSeries
|
protected int |
endIndex
|
protected float[] |
fSeries
|
protected int[] |
iSeries
|
protected double[] |
minMaxMean
index 0 has min, index 1 has max, index 2 has mean. |
protected boolean |
minMaxMeanCalculated
Has min/max/mean already been calculated and cached. |
protected double[] |
partialautocorr
|
protected short[] |
sSeries
|
protected double |
variance
|
protected boolean |
varianceCalculated
Has the variable been calculated and cached. |
| Constructor Summary | |
|---|---|
Statistics(double[] dSeries)
Creates a new Statistics instance. |
|
Statistics(float[] fSeries)
Creates a new Statistics instance. |
|
Statistics(int[] iSeries)
Creates a new Statistics instance. |
|
Statistics(java.util.List<QuantityImpl> vals)
|
|
Statistics(java.util.List<QuantityImpl> vals,
UnitImpl unit)
|
|
Statistics(LocalSeismogramImpl seismo)
Creates a new Statistics instance. |
|
Statistics(short[] sSeries)
Creates a new Statistics instance. |
|
| Method Summary | |
|---|---|
double[] |
acf(int maxlag)
Calculates the autocovariance function out to the given lag. |
double[] |
acf95conf(int maxlag)
Describe acf95conf method here. |
double[] |
acfTRatio(int maxlag)
Calculates the TRatio for the acf out to the given max lag. |
double |
binaryIndexSum(int start,
int finish)
Calulates the sum(i*yi) from beginIndex to endIndex-1. |
double |
binarySum(int start,
int finish)
Calulates the sum of the series from beginIndex to endIndex-1. |
double |
binarySumDevLag(int start,
int finish,
double mean,
int lag)
Describe binarySumDevLag method here. |
double |
binarySumDevSqr(int start,
int finish,
double mean)
Calulates the sum of the square of the difference from the mean. |
double |
correlation(double[] other)
|
double |
covariance(double[] other)
|
double |
covariance(Statistics otherStat)
|
int |
getLength()
The length of the series. |
int[] |
histogram(double start,
double width,
int number)
Creates a histogram of the values. |
double[] |
linearLeastSquares()
Calculates the linear Least Squares slope and intercept for this series. |
double |
max()
Finds the max value. |
double |
max(int beginIndex,
int endIndex)
Finds the max value between index beginIndex and endIndex-1. |
double |
maxDeviation()
Finds the max deviation from the mean. |
double |
maxDeviation(int beginIndex,
int endIndex)
Finds the max deviation from the mean between index
beginIndex and endIndex-1. |
double |
mean()
Calulates mean of the data. |
double |
mean(int beginIndex,
int endIndex)
Finds the mean value between index beginIndex and endIndex-1. |
double |
min()
Finds the min value. |
double |
min(int beginIndex,
int endIndex)
Finds the min value between index beginIndex and endIndex-1. |
double[] |
minMaxMean()
Calculates the min, max and mean. |
double[] |
minMaxMean(int beginIndex,
int endIndex)
Calculates the min, max and mean from beginIndex to endIndex-1. |
double[] |
pacf(int maxlag)
Computes the partial autocorrelation function, after Wei, William S. |
double |
pacf95conf(int maxlag)
Calculates the 95 percent confidence for the pacf. |
double[] |
pacfTRatio(int maxlag)
Calculates the TRatio for the pacf. |
double |
rms()
|
double |
stddev()
Calulates the standard deviation. |
java.lang.String |
toString()
|
double |
var()
Calualates the unbiased variance, ie 1/(n-1) SUM{(x-mean)^2}. |
double |
var(double mean)
calculates the unbiased variance w.r.t the given mean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int[] iSeries
protected short[] sSeries
protected float[] fSeries
protected double[] dSeries
protected boolean minMaxMeanCalculated
protected double[] minMaxMean
protected double variance
protected boolean varianceCalculated
protected double[] autocorrelation
protected double[] partialautocorr
protected int beginIndex
protected int endIndex
| Constructor Detail |
|---|
public Statistics(int[] iSeries)
Statistics instance.
iSeries - an int[] valuepublic Statistics(short[] sSeries)
Statistics instance.
sSeries - a short[] valuepublic Statistics(float[] fSeries)
Statistics instance.
fSeries - a float[] valuepublic Statistics(double[] dSeries)
Statistics instance.
dSeries - a double[] value
public Statistics(LocalSeismogramImpl seismo)
throws FissuresException
Statistics instance.
seismo - a LocalSeismogramImpl value
FissuresExceptionpublic Statistics(java.util.List<QuantityImpl> vals)
public Statistics(java.util.List<QuantityImpl> vals,
UnitImpl unit)
| Method Detail |
|---|
public double min()
min value.
public double min(int beginIndex,
int endIndex)
min value between index beginIndex and endIndex-1.
beginIndex - first index to searchendIndex - end index, last + 1
double valuepublic double max()
max value.
double value
public double max(int beginIndex,
int endIndex)
max value between index beginIndex and endIndex-1.
beginIndex - an int valueendIndex - an int value
double valuepublic double maxDeviation()
max deviation from the mean.
double value
public double maxDeviation(int beginIndex,
int endIndex)
max deviation from the mean between index
beginIndex and endIndex-1.
beginIndex - an int valueendIndex - an int value
double valuepublic double mean()
mean of the data.
double value
public double mean(int beginIndex,
int endIndex)
mean value between index beginIndex and endIndex-1.
beginIndex - an int valueendIndex - an int value
double valuepublic double[] minMaxMean()
public double[] minMaxMean(int beginIndex,
int endIndex)
beginIndex - first indexendIndex - last index +1
public double var()
public double var(double mean)
public double rms()
public double stddev()
public double covariance(double[] other)
public double covariance(Statistics otherStat)
public double correlation(double[] other)
public double[] linearLeastSquares()
public double[] acf(int maxlag)
maxlag - the maximum lag to calculate the acf
public double[] acf95conf(int maxlag)
acf95conf method here.
maxlag - an int value
double[] valuepublic double[] acfTRatio(int maxlag)
maxlag - the maximu lag
public double[] pacf(int maxlag)
maxlag - the maximum lag
public double pacf95conf(int maxlag)
maxlag - the maximum lag
public double[] pacfTRatio(int maxlag)
maxlag - the maximum lag
public int getLength()
public int[] histogram(double start,
double width,
int number)
start - binning start valuewidth - bin widthnumber - number of bins
public java.lang.String toString()
toString in class java.lang.Object
public double binarySum(int start,
int finish)
start - starting indexfinish - last index +1
public double binarySumDevSqr(int start,
int finish,
double mean)
start - first indexfinish - last index+1mean - the mean
public double binarySumDevLag(int start,
int finish,
double mean,
int lag)
binarySumDevLag method here.
start - an int valuefinish - an int valuemean - a double valuelag - an int value
double value
public double binaryIndexSum(int start,
int finish)
start - starting indexfinish - last index +1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||