Package jade.core.sam
Class AverageMeasure
- java.lang.Object
-
- jade.core.sam.AverageMeasure
-
- All Implemented Interfaces:
Provider,Serializable
public class AverageMeasure extends Object implements Serializable, Provider
The class used by the System Activity Monitoring (SAM) Service to represent an aggregated measure i.e. a measure that is calculated aggregating several samples. Actually the right name for this class should be AggregatedMeasure. The name AverageMeasure comes from the fact that computing the average of the samples is the default way of aggregating them. However SUM can be used as an alternative aggregation.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AverageMeasure()AverageMeasure(double value, int nSamples)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetNSamples()doublegetValue()doublegetVariance()voidsetNSamples(int nSamples)voidsetValue(double value)voidsetVariance(double variance)voidupdate(AverageMeasure am)voidupdate(AverageMeasure am, int aggregation)
-
-
-
Method Detail
-
getValue
public double getValue()
-
setValue
public void setValue(double value)
-
getNSamples
public int getNSamples()
-
setNSamples
public void setNSamples(int nSamples)
-
getVariance
public double getVariance()
-
setVariance
public void setVariance(double variance)
-
update
public void update(AverageMeasure am)
-
update
public void update(AverageMeasure am, int aggregation)
-
-