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....



ResampleExtMat


Unit:SDL_matrix
Class: TMatrix
Declaration: function ResampleExtMat (SrcMat: TMatrix; colpct, rowpct: double; BootStrap: boolean; var RndColIx, RndRowIx: TIntArray): integer;

The method ResampleExtMat copies data from the external matrix SrcMat by resampling the external data. The parameters colpct and rowpct control how many of the columns and rows are randomly selected for transferring the corresponding cells. colpct and rowpct have to be specified in percent. The actual number of columns/rows is rounded towards the closest integer value representing this percentage.

The parameter BootStrap controls whether the rows are selected with (=TRUE) or without (=FALSE) replacement. It has no effect on the selection of the columns (they are always selected without replacement). The variable arrays RndColIx and RndRowIx return the indices of the selected columns and rows, respectively.

The function returns the following error codes:

 0 ... everything is OK
-1 ... colpct is invalid or leads to zero new columns
-2 ... rowpct is invalid or leads to zero new rows
-3 ... SrcMat is nil
-4 ... DstMat is nil
-5 ... RndColIx and/or RndRowIx is nil



Last Update: 2023-Feb-06