atropos.lp
Class AvnmpStat

java.lang.Object
  |
  +--atropos.lp.AvnmpStat
All Implemented Interfaces:
java.io.Serializable

public class AvnmpStat
extends java.lang.Object
implements java.io.Serializable

This class is used to track statistics within the AVNMP system.

This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Constructor Summary
AvnmpStat()
          Reset all the values in this object to zero.
 
Method Summary
 double average()
          Return the average of the sample values.
 double average(double val)
          Compute the average of all the accumulated data including the data entered in the parameter.
 void display()
           
 double rate()
          Return the rate of change of the sample values.
 double rate(double val, long time)
          Compute the rate of change of all the accumulated data including the data entered in the parameter at the given time.
 void reset()
          Set all the internal values to zero.
 void set(double val)
          Set the object to hold a particular sample value.
 double sum()
          Return the sum of the sample values.
 double sum(double val)
          Add a new sample value to the sum.
 double variance()
          Return the current variance.
 double variance(double val)
          Compute the variance of all the accumulated data including the data entered in the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvnmpStat

public AvnmpStat()
Reset all the values in this object to zero.
Method Detail

display

public void display()

set

public void set(double val)
Set the object to hold a particular sample value.
Parameters:
val - The value to which the object should be set.

reset

public void reset()
Set all the internal values to zero.

variance

public double variance(double val)
Compute the variance of all the accumulated data including the data entered in the parameter.
Parameters:
val - A new sample value to be added to the existing data.
Returns:
The variance.

sum

public double sum(double val)
Add a new sample value to the sum.
Returns:
The total summation of all the sample values.

average

public double average(double val)
Compute the average of all the accumulated data including the data entered in the parameter.
Parameters:
val - A new sample value to be added to the existing data.
Returns:
The average.

rate

public double rate(double val,
                   long time)
Compute the rate of change of all the accumulated data including the data entered in the parameter at the given time.
Parameters:
val - A new sample value to be added to the existing data.
time - The time of this sample.
Returns:
The rate.

variance

public double variance()
Return the current variance.
Returns:
The variance of the data samples collected.

sum

public double sum()
Return the sum of the sample values.
Returns:
The sum of all the data collected.

average

public double average()
Return the average of the sample values.
Returns:
The average of all the data collected.

rate

public double rate()
Return the rate of change of the sample values.
Returns:
The rate of change of all the data collected.


Copyright © 2002 GE Corporate Research and Development. All Rights Reserved.