The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



PermuteArray


Unit:SDL_openarrays
Class: none
Declaration: function PermuteArray (Data: TDouble2DArray; PermMat: TInt2DArray; Mode: TApplyColRow; TransposeP: boolean; var PData: TDouble2DArray): integer;

The function PermuteArray permutes the array 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



Last Update: 2023-Feb-06