ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.stat.mperiods
Class ListOfStatProbesMeasureMatrix

java.lang.Object
  extended by umontreal.iro.lecuyer.stat.mperiods.ListOfStatProbesMeasureMatrix
All Implemented Interfaces:
Cloneable, MeasureMatrix

public class ListOfStatProbesMeasureMatrix
extends Object
implements MeasureMatrix, Cloneable

Matrix of measures whose values are obtained using an list of statistical probes. This matrix contains one measure for each element of the list, and a single period. The measures are obtained by using the StatProbe.sum() method. Since the sum can be considered as an integral, the IntegralMeasureMatrix can be used to turn this single-period matrix into a multiple-periods one if needed.


Constructor Summary
ListOfStatProbesMeasureMatrix(ListOfStatProbes<? extends StatProbe> list)
          Constructs a new matrix of measures using the list of probes list.
 
Method Summary
 ListOfStatProbesMeasureMatrix clone()
          Makes a copy of this matrix of measures.
 ListOfStatProbes<? extends StatProbe> getListOfStatProbes()
          Returns the list of statistical probes associated with this matrix.
 double getMeasure(int i, int p)
          Returns the measure corresponding to the index i and period p.
 int getNumMeasures()
          Returns the number of measures calculated by the implementation of this interface.
 int getNumPeriods()
          Returns the number of periods stored into this matrix of measures.
 void init()
          Initializes this matrix of measures for a new simulation replication.
 void regroupPeriods(int x)
          Throws an UnsupportedOperationException.
 void setListOfStatProbes(ListOfStatProbes<? extends StatProbe> list)
          Sets the associated list of statistical probes to list.
 void setNumMeasures(int nm)
          Sets the number of measures to nm.
 void setNumPeriods(int np)
          Throws an UnsupportedOperationException.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ListOfStatProbesMeasureMatrix

public ListOfStatProbesMeasureMatrix(ListOfStatProbes<? extends StatProbe> list)
Constructs a new matrix of measures using the list of probes list.

Parameters:
list - the list of statistical probes being used.
Method Detail

getListOfStatProbes

public ListOfStatProbes<? extends StatProbe> getListOfStatProbes()
Returns the list of statistical probes associated with this matrix.

Returns:
the associated list of statistical probes.

setListOfStatProbes

public void setListOfStatProbes(ListOfStatProbes<? extends StatProbe> list)
Sets the associated list of statistical probes to list. If the given list is null, the number of measures and periods is set to 0. Otherwise, the number of measures corresponds to the length of the list, and the number of periods is 1.

Parameters:
list - the new list of statistical probes.

init

public void init()
Description copied from interface: MeasureMatrix
Initializes this matrix of measures for a new simulation replication. This resets the measured values to 0, or initializes the probes used to compute them.

Specified by:
init in interface MeasureMatrix

getNumMeasures

public int getNumMeasures()
Description copied from interface: MeasureMatrix
Returns the number of measures calculated by the implementation of this interface.

Specified by:
getNumMeasures in interface MeasureMatrix
Returns:
the number of computed values.

getNumPeriods

public int getNumPeriods()
Description copied from interface: MeasureMatrix
Returns the number of periods stored into this matrix of measures.

Specified by:
getNumPeriods in interface MeasureMatrix
Returns:
the number of stored periods.

setNumMeasures

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

Specified by:
setNumMeasures in interface MeasureMatrix
Parameters:
nm - the new number of measures.

setNumPeriods

public void setNumPeriods(int np)
Throws an UnsupportedOperationException.

Specified by:
setNumPeriods in interface MeasureMatrix
Parameters:
np - the new number of periods.
Throws:
UnsupportedOperationException - if this method is called.

regroupPeriods

public void regroupPeriods(int x)
Throws an UnsupportedOperationException.

Specified by:
regroupPeriods in interface MeasureMatrix
Parameters:
x - the number of periods per group.
Throws:
UnsupportedOperationException - if this method is called.

getMeasure

public double getMeasure(int i,
                         int p)
Description copied from interface: MeasureMatrix
Returns the measure corresponding to the index i and period p.

Specified by:
getMeasure in interface MeasureMatrix
Parameters:
i - the index of the measure.
p - the period of the measure.
Returns:
the corresponding value.

toString

public String toString()
Overrides:
toString in class Object

clone

public ListOfStatProbesMeasureMatrix clone()
Makes a copy of this matrix of measures. The list of statistical probes is not cloned.

Overrides:
clone in class Object
Returns:
a clone of this instance.

ContactCenters
V. 0.9.9.

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