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



Find


Unit: SDL_matrix
Class: TMat4D
Declaration: procedure Find (LowCol, HighCol, LowRow, HighRow, LowLayer, HighLayer, LowTimeSlot, HighTimeSlot: integer; Value: double; var ColIx, RowIx, LayerIx, TimeSlotIx: integer);

The method Find searches the matrix element which is closest to Value and returns the index of the found element in the variable parameters ColIx, RowIx, LayerIx, and TimeSlotIx. The search range is specified by the parameters LowCol, HighCol, LowRow, HighRow, LowLayer, HighLayer, LowTimeSlot and HighTimeSlot.

Hint: Setting both the low and high parameter of a dimension (i.e. LowCol and HighCol) to zero values forces a search through all elements of that dimension. For example, the call of
   Mat1.Find (2,3,0,0,0,0,1,5,2.31,ix,iy,il,it);
searches all rows and layers of columns 2 and 3 and time slots 1 to 5 of the hypercube matrix Mat1 for the closest value to 2.31 and returns the address of the found cell in the variables ix, iy, il, it.



Last Update: 2012-Oct-20