ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters
Class NonStationaryMeasureMatrix<M extends MeasureMatrix>

java.lang.Object
  extended by umontreal.iro.lecuyer.stat.mperiods.IntegralMeasureMatrix<M>
      extended by umontreal.iro.lecuyer.contactcenters.NonStationaryMeasureMatrix<M>
All Implemented Interfaces:
Cloneable, PeriodChangeListener, MeasureMatrix

public class NonStationaryMeasureMatrix<M extends MeasureMatrix>
extends IntegralMeasureMatrix<M>
implements PeriodChangeListener

Computes per-period values for a one-period measure matrix. This class extends the IntegralMeasureMatrix and maps a period with a contact center period. It automatically calls IntegralMeasureMatrix.newRecord() upon period changes.


Constructor Summary
NonStationaryMeasureMatrix(PeriodChangeEvent pce, M mat)
          Constructs a new non-stationary measure matrix from the one-period measure matrix mat and using the period change event pce to define the periods.
 
Method Summary
 void changePeriod(PeriodChangeEvent pce1)
          Switches to the next period defined by pce.
 void setNumPeriods(int np)
          Sets the number of periods of this matrix to np.
 void stop(PeriodChangeEvent pce1)
          This method is called after the period-change event is stopped by PeriodChangeEvent.stop().
 String toString()
           
 
Methods inherited from class umontreal.iro.lecuyer.stat.mperiods.IntegralMeasureMatrix
clone, createSumMatrix, getMeasure, getMeasureMatrix, getNumMeasures, getNumPeriods, getNumStoredRecords, getPeriod, getSum, getSumMatrix, init, newRecord, regroupPeriods, setMeasureMatrix, setNumMeasures
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonStationaryMeasureMatrix

public NonStationaryMeasureMatrix(PeriodChangeEvent pce,
                                  M mat)
Constructs a new non-stationary measure matrix from the one-period measure matrix mat and using the period change event pce to define the periods.

Parameters:
pce - the period change event.
mat - the one-period only measure matrix.
Throws:
IllegalArgumentException - if a multiple-periods measure matrix is given.
NullPointerException - if any argument is null.
Method Detail

setNumPeriods

public void setNumPeriods(int np)
Description copied from interface: MeasureMatrix
Sets the number of periods of this matrix to np. If this method is supported, it can limit the maximal or minimal accepted number of periods.

Specified by:
setNumPeriods in interface MeasureMatrix
Overrides:
setNumPeriods in class IntegralMeasureMatrix<M extends MeasureMatrix>
Parameters:
np - the new number of periods.

changePeriod

public void changePeriod(PeriodChangeEvent pce1)
Description copied from interface: PeriodChangeListener
Switches to the next period defined by pce. This can change the parameters and correct scheduled events accordingly. If no parameters are available for the new period, the method should try to use those of the last available period. The listener is called after the period change has occurred, so PeriodChangeEvent.getCurrentPeriod() returns the index of the new period.

Specified by:
changePeriod in interface PeriodChangeListener
Parameters:
pce1 - the source period-change event.

stop

public void stop(PeriodChangeEvent pce1)
Description copied from interface: PeriodChangeListener
This method is called after the period-change event is stopped by PeriodChangeEvent.stop().

Specified by:
stop in interface PeriodChangeListener
Parameters:
pce1 - the period-change event being stopped.

toString

public String toString()
Overrides:
toString in class IntegralMeasureMatrix<M extends MeasureMatrix>

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.