gridsim
Class Accumulator

java.lang.Object
  |
  +--gridsim.Accumulator

public class Accumulator
extends java.lang.Object

GridSim Accumulator to which series of items can be added and then request for min, max, mean, square_mean, standard deviation of those values at any desired time.


Constructor Summary
Accumulator()
           
 
Method Summary
 void add(double item)
           
 void add(double item, int times)
           
static int ByteSize()
           
 int count()
           
 double last()
           
 double max()
           
 double mean()
           
 double min()
           
 double sd()
           
 double sum()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accumulator

public Accumulator()
Method Detail

add

public void add(double item,
                int times)
Parameters:
item - an item to be added to the accumulator
times - number of time the item value is repeated

add

public void add(double item)
Parameters:
item - an item to be added to the accumulator

mean

public double mean()
Returns:
the mean of accumated items

sd

public double sd()
Returns:
the Standard Deviation of accumulated items.

min

public double min()
Returns:
the smallest of accumated items

max

public double max()
Returns:
the larges of accumated items

last

public double last()
Returns:
the last accumated items

count

public int count()
Returns:
the the number of items accumated so far

sum

public double sum()
Returns:

ByteSize

public static int ByteSize()
Returns:
The Size of object of this class.