Check whether P is a valid transition probability matrix.
If P is valid, r is the size (number of rows or columns) of P. If P is not a transition probability matrix, r is set to zero, and err to an appropriate error string.
Package: queueing