Represents a matrix of statistical probes that can be managed simultaneously. More...
Classes | |
| enum | ListType |
Public Member Functions | |
| MatrixOfStatProbes (int numRows, int numColumns) | |
| Constructs a new unnamed matrix of statistical probes with numRows rows, and numColumns columns, and filled with null references. | |
| MatrixOfStatProbes (String name, int numRows, int numColumns) | |
| Constructs a new matrix of statistical probes with name name, numRows rows, and numColumns columns, and filled with null references. | |
| String | getName () |
| Returns the global name of this matrix of statistical probes. | |
| void | setName (String name) |
| Sets the global name of this matrix to name. | |
| int | rows () |
| Returns the number of rows in this matrix. | |
| int | columns () |
| Returns the number of columns in this matrix. | |
| void | setRows (int newRows) |
| Sets the number of rows of this matrix of statistical probes to newRows, adding or removing cells as necessary. | |
| void | setColumns (int newColumns) |
| Similar to setRows(int), for setting the number of columns. | |
| E | get (int r, int c) |
| Returns the statistical probe corresponding to the row r and column c. | |
| void | set (int r, int c, E probe) |
| Sets the statistical probe corresponding to the row r and column c to probe. | |
| void | init () |
| Initializes this matrix of statistical probes by calling StatProbe.init on each element. | |
| void | sum (DoubleMatrix2D m) |
| For each probe in the matrix, computes the sum by calling umontreal.ssj.stat.StatProbe.sum, and stores it into the given matrix m. | |
| void | average (DoubleMatrix2D m) |
| For each statistical probe in the matrix, computes the average by calling umontreal.ssj.stat.StatProbe.average, and stores it into the given matrix m. | |
| boolean | isCollecting () |
| Determines if this matrix of statistical probes is collecting values. | |
| void | setCollecting (boolean c) |
| Sets the status of the statistical collecting mechanism to c. | |
| boolean | isBroadcasting () |
| Determines if this matrix of statistical probes is broadcasting values to registered observers. | |
| void | setBroadcasting (boolean b) |
| Sets the status of the observation broadcasting mechanism to b. | |
| void | addMatrixOfObservationListener (MatrixOfObservationListener l) |
| Adds the observation listener l to the list of observers of this matrix of statistical probes. | |
| void | removeMatrixOfObservationListener (MatrixOfObservationListener l) |
| Removes the observation listener l from the list of observers of this matrix of statistical probes. | |
| void | clearMatrixOfObservationListeners () |
| Removes all observation listeners from the list of observers of this matrix of statistical probes. | |
| void | notifyListeners (DoubleMatrix2D x) |
| Notifies the observation x to all registered observers if broadcasting is ON. | |
| List< E > | viewRow (int r) |
| Returns a list representing a view on row r of this matrix of statistical probe. | |
| List< E > | viewColumn (int c) |
| Returns a list representing a view on column c of this matrix of statistical probe. | |
| String | rowReport (int r) |
| Formats a report for the row r of the statistical probe matrix. | |
| String | columnReport (int c) |
| Formats a report for the column c of the statistical probe matrix. | |
| MatrixOfStatProbes< E > | clone () |
| Clones this object. | |
Represents a matrix of statistical probes that can be managed simultaneously.
Each element of this matrix is a
umontreal.ssj.stat.StatProbe instance which can be obtained and manipulated. Alternatively, several methods are provided to manipulate all probes in the matrix simultaneously.
Each matrix of probes can have a global name describing the contents of its elements, and local names for each cell. For example, a matrix of statistical probes for the waiting times can have the global name "<tt>Waiting times</tt>" while the first cell has local name "<tt>type 1, period 1</tt>".
Facilities are provided to fill matrices of sums, averages, etc. obtained from the individual statistical probes. DoubleMatrix2D is used instead of 2D arrays because it more efficiently stores the values, and it supports computations on the elements. <div class="SSJ-bigskip"></div>
Definition at line 60 of file MatrixOfStatProbes.java.
| umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.MatrixOfStatProbes | ( | int | numRows, |
| int | numColumns ) |
Constructs a new unnamed matrix of statistical probes with numRows rows, and numColumns columns, and filled with null references.
| numRows | the number of rows in the matrix. |
| numColumns | the number of columns in the matrix. |
| NegativeArraySizeException | if `numRows` or `numColumns` are negative. |
Definition at line 83 of file MatrixOfStatProbes.java.
| umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.MatrixOfStatProbes | ( | String | name, |
| int | numRows, | ||
| int | numColumns ) |
Constructs a new matrix of statistical probes with name name, numRows rows, and numColumns columns, and filled with null references.
| name | the global name of the matrix. |
| numRows | the number of rows in the matrix. |
| numColumns | the number of columns in the matrix. |
| NegativeArraySizeException | if `numRows` or `numColumns` are negative. |
Definition at line 97 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.addMatrixOfObservationListener | ( | MatrixOfObservationListener | l | ) |
Adds the observation listener l to the list of observers of this matrix of statistical probes.
| l | the new observation listener. |
| NullPointerException | if `l` is `null`. |
Definition at line 350 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.average | ( | DoubleMatrix2D | m | ) |
For each statistical probe in the matrix, computes the average by calling umontreal.ssj.stat.StatProbe.average, and stores it into the given matrix m.
| m | the matrix to be filled with averages. |
| NullPointerException | if `m` is `null`. |
| IllegalArgumentException | if `m.rows()` does not correspond to rows, or m.columns() does not correspond to columns. |
Definition at line 289 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.clearMatrixOfObservationListeners | ( | ) |
Removes all observation listeners from the list of observers of this matrix of statistical probes.
Definition at line 371 of file MatrixOfStatProbes.java.
| MatrixOfStatProbes< E > umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.clone | ( | ) |
Clones this object.
This makes a shallow copy of this matrix, i.e., this does not clone all the probes in the matrix.
Definition at line 440 of file MatrixOfStatProbes.java.
| String umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.columnReport | ( | int | c | ) |
Formats a report for the column c of the statistical probe matrix.
The returned string is constructed by getting a view of column c and using StatProbe.report on this list.
| c | the column being reported. |
Definition at line 432 of file MatrixOfStatProbes.java.
| int umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.columns | ( | ) |
Returns the number of columns in this matrix.
Definition at line 147 of file MatrixOfStatProbes.java.
| E umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.get | ( | int | r, |
| int | c ) |
Returns the statistical probe corresponding to the row r and column c.
| r | the row to look at. |
| c | the column to look at. |
| ArrayIndexOutOfBoundsException | if `r` or `c` are negative, if `r` is greater than or equal to rows, or if c is greater than or equal to columns. |
Definition at line 213 of file MatrixOfStatProbes.java.
| String umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.getName | ( | ) |
Returns the global name of this matrix of statistical probes.
Definition at line 120 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.init | ( | ) |
Initializes this matrix of statistical probes by calling StatProbe.init on each element.
Definition at line 246 of file MatrixOfStatProbes.java.
| boolean umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.isBroadcasting | ( | ) |
Determines if this matrix of statistical probes is broadcasting values to registered observers.
The default is false.
Definition at line 329 of file MatrixOfStatProbes.java.
| boolean umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.isCollecting | ( | ) |
Determines if this matrix of statistical probes is collecting values.
The default is true.
Definition at line 309 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.notifyListeners | ( | DoubleMatrix2D | x | ) |
Notifies the observation x to all registered observers if broadcasting is ON.
Otherwise, does nothing.
Definition at line 379 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.removeMatrixOfObservationListener | ( | MatrixOfObservationListener | l | ) |
Removes the observation listener l from the list of observers of this matrix of statistical probes.
| l | the observation listener to be deleted. |
Definition at line 363 of file MatrixOfStatProbes.java.
| String umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.rowReport | ( | int | r | ) |
Formats a report for the row r of the statistical probe matrix.
The returned string is constructed by getting a view of row r and using StatProbe.report on this list.
| r | the row being reported. |
Definition at line 420 of file MatrixOfStatProbes.java.
| int umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.rows | ( | ) |
Returns the number of rows in this matrix.
Definition at line 138 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.set | ( | int | r, |
| int | c, | ||
| E | probe ) |
Sets the statistical probe corresponding to the row r and column c to probe.
| r | the row to modify. |
| c | the column to modify. |
| probe | t he new probe. |
| ArrayIndexOutOfBoundsException | if `r` or `c` are negative, if `r` is greater than or equal to rows, or if c is greater than or equal to columns. |
Definition at line 233 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.setBroadcasting | ( | boolean | b | ) |
Sets the status of the observation broadcasting mechanism to b.
A true value turns broadcasting ON, a false value turns it OFF.
| b | the status of broadcasting. |
Definition at line 339 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.setCollecting | ( | boolean | c | ) |
Sets the status of the statistical collecting mechanism to c.
A true value turns statistical collecting ON, a false value turns it OFF.
| c | the status of statistical collecting. |
Definition at line 319 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.setColumns | ( | int | newColumns | ) |
Similar to setRows(int), for setting the number of columns.
| newColumns | the new number of columns of the matrix. |
| IllegalArgumentException | if an error occurs during construction of statistical probes. |
| NegativeArraySizeException | if `newolumns` is negative. |
Definition at line 185 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.setName | ( | String | name | ) |
Sets the global name of this matrix to name.
| name | the new global name of the matrix. |
Definition at line 129 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.setRows | ( | int | newRows | ) |
Sets the number of rows of this matrix of statistical probes to newRows, adding or removing cells as necessary.
If newRows is negative, a NegativeArraySizeException is thrown. Otherwise, if newRows is equal to rows, nothing happens. If the number of rows is reduced, the last rows - newRows rows of statistical probes are lost. If the number of rows is increased, the new elements of the matrix are set to null.
| newRows | the new number of rows of the matrix. |
| IllegalArgumentException | if an error occurs during construction of statistical probes. |
| NegativeArraySizeException | if `newRows` is negative. |
Definition at line 164 of file MatrixOfStatProbes.java.
| void umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.sum | ( | DoubleMatrix2D | m | ) |
For each probe in the matrix, computes the sum by calling umontreal.ssj.stat.StatProbe.sum, and stores it into the given matrix m.
| m | the matrix to be filled with sums. |
| NullPointerException | if `m` is `null`. |
| IllegalArgumentException | if `m.rows()` does not correspond to rows, or m.columns() does not correspond to columns. |
Definition at line 264 of file MatrixOfStatProbes.java.
| List< E > umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.viewColumn | ( | int | c | ) |
Returns a list representing a view on column c of this matrix of statistical probe.
The returned list cannot be modified, and becomes invalid if the number of columns in this matrix of statistical probes is changed.
| c | the column to look at. |
Definition at line 408 of file MatrixOfStatProbes.java.
| List< E > umontreal.ssj.stat.matrix.MatrixOfStatProbes< E extends StatProbe >.viewRow | ( | int | r | ) |
Returns a list representing a view on row r of this matrix of statistical probe.
The returned list cannot be modified, and becomes invalid if the number of rows in this matrix of statistical probes is changed.
| r | the row to look at. |
Definition at line 396 of file MatrixOfStatProbes.java.