DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


PermuteMatrix

Declaration: PermuteMatrix (Data: TDouble2DArray; PermMat: TInt2DArray; Mode: TApplyColRow; TransposeP: boolean; var PData: TDouble2DArray): integer;
The function PermuteMatrix permutes the matrix Data and returns the result in the variable array PData. The parameter Mode controls whether the columns or the rows are permuted according to the square permutation matrix PermMat. If TransposeP is TRUE the permutation matrix is transposed before it is applied to the Data array. The resulting matrix PData is automatically adjusted in its size.

The function returns the following error codes:

 0 ... everything is OK
-1 ... PermMat is not a valid permutation matrix
-2 ... Data and PermMat do not have compatible dimensions