MaxpMat
Mat – Max plus matrix data type
m2mp – Max plus matrix data type
Calling sequence
Parameters
- A: matrix numerical object.
Description
The MaxpMat data type is the Max plus matrix numerical object. Internally numerical matrices
MaxpMat type are stored by default as arrays of double.
Operations on matrices
Methods from the matint interface
- A.redim[m,n] reshape matrix to size mxn. m or n can be set to -1
- A.concatr[B] A = [A,B]
- A.concatd[B] A = [A;B]
- A.perm_elem[p,q[,dim]] permute p and q: elements (default or dim=0), rows (dim=1)
or columns (dim=2).
Extraction, insertion, deletion
- If I and is J are respectively row and column indices A(I,J) is the submatrix of A with
entries in I and j.
- A(I,:) is the submatrix of A with row indices in I.
- A(:,J) is the submatrix of A with comumn indices in I.
- A(:,:) is A
- A(:) is the column matrix obtained by stacking the columns of A.
- If I and is J are row and column indices A(I,J)=B inserts matrix B into matrix A in
rows I and columns J.
- A(I,:)=[] removes the rows of A with indices in J.
- A(:,J)=[] removes the columns of A with indices in J.
Empty matrices
Empty matrices are matrices with zero rows or zero columns. Operations with
empty matrices are compatible with linear algebra operations. The m x n zero matrix can be
factorized as the empty m x 0 matrix * the 0 x n matrix.
For loop control
With a matrix A:
is a loop with size(A,2) iterations, the loop variable col being equal to the ith column of A at the
i-th iteration.
Some functions
- length(A) returns the number of entries in A.
- size(A) returns in a 1 x 2 vector the dimensions (rows, columns) of A. size(A,1)
(resp. size(A,2)) retuns the number of rows (resp. columns) of A.
See also
Authors jpc