|
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.SumMatrix
umontreal.iro.lecuyer.contactcenters.contact.ContactSumMatrix
public class ContactSumMatrix
This sum matrix can be used to compute contact-related
observations. It defines one measure type for each contact type
as well as one aggregate measure. When the supported
number of contact types is 1, it computes the aggregate sum only.
When the supported number of contact types is greater than 1,
it computes a sum specific for each type as well as the aggregate sum.
If one does not require the sum row, one can use a SumMatrix
instead.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.stat.mperiods.SumMatrix |
---|
count, numPeriods, numStoredPeriods, numTypes |
Constructor Summary | |
---|---|
ContactSumMatrix(int numTypes)
Constructs a new contact sum matrix for numTypes contact types and one period. |
|
ContactSumMatrix(int numTypes,
int numPeriods)
Constructs a new contact sum matrix for numTypes contact types and numPeriods periods. |
|
ContactSumMatrix(PeriodChangeEvent pce,
int numTypes)
Constructs a new contact sum matrix with period change event pce and for numTypes contact types. |
Method Summary | |
---|---|
void |
add(Contact contact,
double x)
Equivalent to add
(contact.getTypeId(), period, x) where
period is the period at which the contact
arrived. |
void |
add(Contact contact,
int period,
double x)
Equivalent to add
(contact.getTypeId(), period, x). |
void |
add(int type,
int period,
double x)
Adds a new observation x for contact type type in the period period. |
void |
setNumMeasures(int nm)
Sets the number of measures to nm. |
String |
toString()
|
Methods inherited from class umontreal.iro.lecuyer.stat.mperiods.SumMatrix |
---|
add, clone, getMeasure, getNumMeasures, getNumPeriods, getNumStoredPeriods, getPeriod, init, regroupPeriods, regroupPeriods, set, setNumPeriods |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContactSumMatrix(int numTypes)
numTypes
- the number of contact types.
IllegalArgumentException
- if the number of contact types
is negative or 0.public ContactSumMatrix(PeriodChangeEvent pce, int numTypes)
PeriodChangeEvent.getNumPeriods()
.
pce
- the period change event.numTypes
- the number of contact types.
IllegalArgumentException
- if the number of contact types
is negative or 0.
NullPointerException
- if pce is null.public ContactSumMatrix(int numTypes, int numPeriods)
numTypes
- the number of contact types.numPeriods
- the number of periods.
IllegalArgumentException
- if the number of contact types
or periods is negative or 0.Method Detail |
---|
public void setNumMeasures(int nm)
SumMatrix
SumMatrix.getNumMeasures()
, new measures are added and initialized to 0. If
nm is smaller than SumMatrix.getNumMeasures()
, the last
SumMatrix.getNumMeasures()
- nm measures are removed. Otherwise,
nothing happens.
setNumMeasures
in interface MeasureMatrix
setNumMeasures
in class SumMatrix
nm
- the new number of measures.public void add(Contact contact, double x)
add
(contact.getTypeId(), period, x) where
period is the period at which the contact
arrived. If no period change event was
associated with this object, the period is always 0.
contact
- the contact to which the observation is related.x
- the value being added.
NullPointerException
- if contact is null.public void add(Contact contact, int period, double x)
add
(contact.getTypeId(), period, x).
contact
- the contact to which the observation is related.period
- the period the observation is added to.x
- the value being added.
NullPointerException
- if contact is null.public void add(int type, int period, double x)
add
in class SumMatrix
type
- the contact type of the new observation.period
- the period of the new observation.x
- the value being added.
ArrayIndexOutOfBoundsException
- if type or
period are negative or greater than or equal to the
number of supported contact types or periods.public String toString()
toString
in class SumMatrix
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |