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



Resize


Unit:SDL_dstruct
Class:TByteMatrix
Declaration:function Resize (NrColumns, NrRows: integer): boolean;

The method Resize serves to change both dimensions (columns and rows) of the matrix at once. The parameters NrColumns and NrRows specify the intended size of the matrix (number of columns and number of rows). Resize returns a TRUE value if the new matrix has been resized successfully.

Hint 1: Resize attempts to preserve any existing matrix values. Any additional matrix elements which are not covered by the original matrix are set to zero values.

Hint 2: Under Delphi 8 for .NET resizing a byte matrix allocates additional auxiliary memory in order to keep the existing cell values valid. If you don't need the values of a matrix and the matrix size is rather large, you are better off if you free the old matrix and create the new matrix from scratch.

Hint 3: In the Light Edition the number of cells is restricted to 2000 (NrOfColumns times NrOfRows).



Last Update: 2012-Oct-20