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


Unit: SDL_matrix
Class: TMat4D
Declaration: function Resize (Nc, Nr, Nl, Nt: longint): boolean;

The method Resize serves to change the dimensions of the hypercube matrix. The parameters Nc, Nr, Nl, and Nt define the intended size of the matrix (number of columns, number of rows, number of layers, and number of time slots, respectively). Resize returns a TRUE value if the new matrix has been resized successfully.

Hint 1: In contrast to TMat3D, all matrix elements are destroyed during the resize process. If you want to initialize the matrix elements to a particular value you should call the method Fill immediately after Resize.

Hint 2: TMat4D is designed to create minimum memory requirements with a low number of time slots. If you have a high number of time slots (say, more than a few) the memory requirements will be considerably higher than 8 bytes per matrix cell. In the worst case (when the number of time slots is in the thousands) the memory requirements will roughly quadruple compared to the "naive" calculation.

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

Last Update: 2015-Mai-13