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


Class: TMatrix, TIntMatrix
Declaration: function Sum (LoC,LoR,HiC,HiR: integer): double; { class TMatrix }
function Sum (LoC,LoR,HiC,HiR: integer): longint; { class TIntMatrix }

The method Sum calculates the sum of all matrix elements within a specific area. The range of the matrix elements to be used is determined by the parameters LoR, LoC, HiR, and HiC. If any of these parameters receives an invalid value, this value is automatically adjusted to the nearest border value (either 1 or NrOfColumns /NrOfRows ).

Hint: Setting both the low and high parameter of a dimension (i.e. LoC and HiC) to zero values forces the method to use all elements of that dimension.

Last Update: 2020-Aug-23