All Packages Class Hierarchy This Package Previous Next Index
Class eduni.simjava.Sim_accum
java.lang.Object

+eduni.simjava.Sim_accum
 public class Sim_accum
 extends Object
A class for collecting statistical data during simulations.

Sim_accum()
 Constructor.

Sim_accum(String)
 Constructor, with name for SIM++ compatability.

avg()
 Calculates the average value held over the total
interval recorded.

interval_sum()
 Sums all the intervals recorded so far.

max()
 Find the maximum value recorded so far

min()
 Find the minimum value recorded so far

update(double, double)
 Add a new record to the statistics collected so far.
Sim_accum
public Sim_accum()
 Constructor.
 Returns:
 A new instance of the class
Sim_accum
public Sim_accum(String name)
 Constructor, with name for SIM++ compatability.
 Parameters:
 name  The name to be associated with the instance,
(currently ignored).
 Returns:
 A new instance of the class
update
public void update(double interval,
double value)
 Add a new record to the statistics collected so far.
 Parameters:
 interval  How long the value held
 value  The value to record
min
public double min()
 Find the minimum value recorded so far
 Returns:
 The minimum value recorded so far, or 0.0
if no values have been recorded
max
public double max()
 Find the maximum value recorded so far
 Returns:
 The maximum value recorded so far, or 0.0
if no values have been recorded
avg
public double avg()
 Calculates the average value held over the total
interval recorded.
i.e. Sum_for_all_i(value[i]*interval[i])/total_interval
 Returns:
 The average value
interval_sum
public double interval_sum()
 Sums all the intervals recorded so far.
 Returns:
 The sum of the intervals
All Packages Class Hierarchy This Package Previous Next Index