|
CESE 1.4.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.simulogic.dataview.analysis.ChannelStatsProxy
public class ChannelStatsProxy
This helper class improves performance of the batch statistics operations.
The performance of the statistics operations can be improved by caching some
frequently used values instead of recalculating them from scratch every time.
This class does exactly this transparently to user, it delegates (in most
cases) the actual calculations to ChannelStats
.
Note, that usage of this class is advantageous only when you are performing
several consequitive statistics routines on the channel, if you need only one
or two statistics parameters, you're probably better off with a direct call
to ChannelStats
.
This class is created with reuse in mind: you can reset its state by calling
clear()
instead of instantiating the object every time.
Constructor Summary | |
---|---|
ChannelStatsProxy()
Creates new ChannelStatsProxy |
Method Summary | |
---|---|
void |
clear()
Resets class state to the initial conditions |
double |
get10_90RiseTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the time for curve rise from 10 to 90% |
double |
get90_10DecayTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the time for curve decay from 90 to 10% |
double |
getAbsolutePeak(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the absolute peak value of a data sequence |
double |
getAbsolutePeakTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the absolute peak time of a data sequence |
double |
getAbsoluteSlope(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the maximum slope abs(delta(data)/delta(time))
index |
double |
getCurveArea(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the area under the curve of a data sequence. |
double |
getHalfWidthTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the half-width of curve in time units |
double |
getMaxSlope(double xMin,
double xMax,
int direction,
DataChannel xChannel,
DataChannel yChannel)
Returns the maximum slope abs(delta(data)/delta(time))
value |
double |
getMaxSlopeTime(double xMin,
double xMax,
int direction,
DataChannel xChannel,
DataChannel yChannel)
Returns the maximum slope abs(delta(data)/delta(time))
time |
double |
getMean(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the mean of a data sequence. |
double |
getN(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the number of data points between xMin and xMax for the given x channel / y channel pair |
double |
getNegativePeak(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the negative peak value of a data sequence |
double |
getNegativePeakTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the negative peak time of a data sequence |
double |
getPositivePeak(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the positive peak value of a data sequence |
double |
getPositivePeakTime(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the positive peak time of a data sequence |
double |
getStandardDeviation(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the standard deviation of a data sequence. |
double |
getStandardError(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the standard error of a data sequence. |
double |
getSumOfSquaredDeviations(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the sum of squared mean deviations of a data sequence. |
double |
getVariance(double xMin,
double xMax,
DataChannel xChannel,
DataChannel yChannel)
Returns the variance of a data sequence. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChannelStatsProxy()
Method Detail |
---|
public void clear()
public final double getN(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getMean(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
sum / size
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getVariance(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
(sumOfSquares - mean*sum) / size
with
mean = sum/size
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getStandardDeviation(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
Math.sqrt(variance)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getStandardError(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
Math.sqrt(variance/size)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getSumOfSquaredDeviations(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
variance * (size-1) == Sum( (data[i] - mean)^2 )
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getNegativePeak(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getNegativePeakTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getPositivePeak(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getPositivePeakTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getAbsolutePeak(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getAbsolutePeakTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getCurveArea(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getMaxSlopeTime(double xMin, double xMax, int direction, DataChannel xChannel, DataChannel yChannel)
abs(delta(data)/delta(time))
time
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xdirection
- search direction (to left or to right from the peak)xChannel
- x channelyChannel
- y channel
public final double getMaxSlope(double xMin, double xMax, int direction, DataChannel xChannel, DataChannel yChannel)
abs(delta(data)/delta(time))
value
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xdirection
- search direction (to left or to right from the p)xChannel
- x channelyChannel
- y channel
public final double getAbsoluteSlope(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
abs(delta(data)/delta(time))
index
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double getHalfWidthTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double get10_90RiseTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
public final double get90_10DecayTime(double xMin, double xMax, DataChannel xChannel, DataChannel yChannel)
This method assumes that xchannel values are monotonically rising with
index. All values that do not satisfy x[n]<x[n+1]
criterion are discarded.
xMin
- minimal limit for xxMax
- maximal limit for xxChannel
- x channelyChannel
- y channel
|
CESE 1.4.7 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |