Structures
Class LoadCollection

java.lang.Object
  extended by Structures.LoadCollection

public class LoadCollection
extends java.lang.Object


Constructor Summary
LoadCollection(int noLoadsInTraining)
           
 
Method Summary
 void add(java.lang.Double newLoad)
          Add is the method to add a new load in the LoadCollection.The caller is responsible to calculate the new load based on the difference of newValue minus previousValue of whatever is measured.
 int getAggregatedLoadsCount()
           
 double getAverage()
          Returns the current mean value of loads
 int getCountOfOutliers()
          Returns the number of outlier samples
 double getLastValue()
          Returns the last load value added to the list
 java.util.Collection<java.lang.Double> getLoadCollection()
          Returns the current load collection
 double getMaxLoad()
          Returns the max value from the current samples
 double getMinLoad()
          Returns the min value from the current samples
 int getSize()
          Returns the size of the current load collection
 double getStdDeviation()
          Returns the current value of our samples' standard deviation
 double getUT()
          Returns the current value of our samples' UT
 boolean isLastAddedLoadAnOutlier()
          Returns true if the last load added was an outlier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadCollection

public LoadCollection(int noLoadsInTraining)
Method Detail

add

public void add(java.lang.Double newLoad)
Add is the method to add a new load in the LoadCollection.The caller is responsible to calculate the new load based on the difference of newValue minus previousValue of whatever is measured. The add differentiates between three states, filling up with new samples during training phase last packet of training phase where the initial values of statistics are calculated and operational mode where the statistics are continuously updated. The concept can be applied in both one-time polling and continuous polling where in the one-time polling case, the whole process can be considered as the training phase in the end of which we receive the statistics. Additionally, the various statistics are continuously updated and providing them through accessor methods, thus reducing the number of needed calculations/elements iterations


getAverage

public double getAverage()
Returns the current mean value of loads

Returns:
the current mean value of loads

getStdDeviation

public double getStdDeviation()
Returns the current value of our samples' standard deviation

Returns:
the current value of our samples' standard deviation

getUT

public double getUT()
Returns the current value of our samples' UT

Returns:
the current value of our samples' UT

getMaxLoad

public double getMaxLoad()
Returns the max value from the current samples

Returns:
the max value from the current samples

getMinLoad

public double getMinLoad()
Returns the min value from the current samples

Returns:
the min value from the current samples

getLoadCollection

public java.util.Collection<java.lang.Double> getLoadCollection()
Returns the current load collection

Returns:
the current load collection

getCountOfOutliers

public int getCountOfOutliers()
Returns the number of outlier samples

Returns:
the number of outlier samples

getSize

public int getSize()
Returns the size of the current load collection

Returns:
the size of the current load collection

getAggregatedLoadsCount

public int getAggregatedLoadsCount()

isLastAddedLoadAnOutlier

public boolean isLastAddedLoadAnOutlier()
Returns true if the last load added was an outlier

Returns:

getLastValue

public double getLastValue()
Returns the last load value added to the list

Returns: