ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.stat.mperiods
Class StatProbeMeasureMatrix

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

public class StatProbeMeasureMatrix
extends Object
implements MeasureMatrix, Cloneable

Matrix of measures whose value is obtained using a statistical probe. This matrix only contains one measure and one period, and its value is obtained by using StatProbe.sum(). Since the sum can be considered as an integral, the IntegralMeasureMatrix class can be used to turn this single-period matrix into a multiple-periods one.


Constructor Summary
StatProbeMeasureMatrix(StatProbe probe)
          Constructs a new matrix of measures using the statistical probe probe.
 
Method Summary
 StatProbeMeasureMatrix clone()
          Makes a copy of this matrix of measures.
 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.
 StatProbe getStatProbe()
          Returns the statistical probe associated with this matrix.
 void init()
          Initializes this matrix of measures for a new simulation replication.
 void regroupPeriods(int x)
          Throws an UnsupportedOperationException.
 void setNumMeasures(int nm)
          Throws an UnsupportedOperationException.
 void setNumPeriods(int np)
          Throws an UnsupportedOperationException.
 void setStatProbe(StatProbe probe)
          Sets the associated statistical probe to probe.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StatProbeMeasureMatrix

public StatProbeMeasureMatrix(StatProbe probe)
Constructs a new matrix of measures using the statistical probe probe.

Parameters:
probe - the statistical probe being used.
Method Detail

getStatProbe

public StatProbe getStatProbe()
Returns the statistical probe associated with this matrix.

Returns:
the associated statistical probe.

setStatProbe

public void setStatProbe(StatProbe probe)
Sets the associated statistical probe to probe. If null is given, this changes the number of measures and periods to 0. If a non-null probe is given, the number of measures in this object is 1.

Parameters:
probe - the new statistical probe.

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)
Throws an UnsupportedOperationException.

Specified by:
setNumMeasures in interface MeasureMatrix
Parameters:
nm - the new number of measures.
Throws:
UnsupportedOperation - if this method is called.

setNumPeriods

public void setNumPeriods(int np)
Throws an UnsupportedOperationException.

Specified by:
setNumPeriods in interface MeasureMatrix
Parameters:
np - the new number of periods.
Throws:
UnsupportedOperation - 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:
UnsupportedOperation - 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 StatProbeMeasureMatrix clone()
Makes a copy of this matrix of measures. The statistical probe 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.