|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.stat.mperiods.MeasureSet
public class MeasureSet
Represents a set of related measures computed using different measure
matrices. Each measure of such a set corresponds to a measure computed by
another matrix. For example, this class can regroup the queue size for
different waiting queues. It can compute the sum of the measures for each
period, and give statistical collecting mechanisms access to the measures
using the MeasureMatrix
interface.
Nested Class Summary | |
---|---|
static class |
MeasureSet.MeasureInfo
Contains information about a measure added to a measure set. |
Constructor Summary | |
---|---|
MeasureSet()
Constructs a new empty measure set. |
Method Summary | |
---|---|
void |
addMeasure(MeasureMatrix mat,
int imat)
Adds the measure imat calculated by mat to this set of measures. |
void |
clearMeasures()
Clears all measures contained in this set. |
MeasureSet |
clone()
|
double |
getMeasure(int i,
int p)
Returns the measure i in period p for this matrix. |
MeasureSet.MeasureInfo |
getMeasureInfo(int i)
Returns the measure information object for measure i. |
int |
getNumMeasures()
Returns the number of supported measures. |
int |
getNumPeriods()
Returns the number of supported periods. |
void |
init()
This method does nothing in this implementation. |
boolean |
isComputingSumRow()
Determines if the measure set contains an additional row containing the sum of each column. |
void |
regroupPeriods(int x)
This implementation does not support period regrouping. |
void |
setComputingSumRow(boolean b)
Sets the computing sum row indicator to b. |
void |
setNumMeasures(int nm)
This implementation does not support changing the number of measures. |
void |
setNumPeriods(int np)
This implementation does not support changing the number of periods. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MeasureSet()
addMeasure(umontreal.iro.lecuyer.stat.mperiods.MeasureMatrix, int)
method must be
used to add some measures.
Method Detail |
---|
public boolean isComputingSumRow()
public void setComputingSumRow(boolean b)
isComputingSumRow()
for more information.
b
- the new sum row computing indicator.public void addMeasure(MeasureMatrix mat, int imat)
mat
- the measure matrix computing the added measure.imat
- the index of the added measure, in mat.
NullPointerException
- if mat is null.public void clearMeasures()
public MeasureSet.MeasureInfo getMeasureInfo(int i)
IndexOutOfBoundsException
- if i is out of bounds.public int getNumMeasures()
isComputingSumRow()
returns
true, or n is returned otherwise.
getNumMeasures
in interface MeasureMatrix
public int getNumPeriods()
getNumPeriods
in interface MeasureMatrix
public void setNumMeasures(int nm)
setNumMeasures
in interface MeasureMatrix
nm
- the new number of measures.
UnsupportedOperationException
- if this method is called.public void setNumPeriods(int np)
setNumPeriods
in interface MeasureMatrix
np
- the new number of periods.
UnsupportedOperationException
- if this method is called.public void regroupPeriods(int x)
regroupPeriods
in interface MeasureMatrix
x
- the number of periods per group.
UnsupportedOperationException
- if this method is called.public void init()
init
in interface MeasureMatrix
public double getMeasure(int i, int p)
getNumMeasures()
if isComputingSumRow()
returns
false. If i < n, this returns the ith measure added to this
set. If i = n, n > 1 and the measure set is computing the sum row, this
returns the sum of all the contained measures for period p. Let
P be the number of periods as returned by getNumPeriods()
. If
p is greater than or equal to the number of periods in the
queried measure matrix but smaller than P, Double.NaN
is
returned. In the sum of measures, the NaN value is not counted to avoid a
NaN sum.
getMeasure
in interface MeasureMatrix
i
- the index of the measure.p
- the index of the period.
IndexOutOfBoundsException
- if the measure or period indices are out of bounds.public String toString()
toString
in class Object
public MeasureSet clone()
clone
in class Object
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |