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



AccumulateArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function AccumulateArray (var Arr: TIntArray; Src: TIntArray; Wgt: integer): integer;
[2] function AccumulateArray (var Arr: TInt2DArray; Src: TInt2DArray; Wgt: integer): integer;
[3] function AccumulateArray (var Arr: TInt3DArray; Src: TInt3DArray; Wgt: integer): integer;
[4] function AccumulateArray (var Arr: TInt4DArray; Src: TInt4DArray; Wgt: integer): integer;
[5] function AccumulateArray (var Arr: TDoubleArray; Src: TDoubleArray; Wgt: double): integer;
[6] function AccumulateArray (var Arr: TDouble2DArray; Src: TDouble2DArray; Wgt: double): integer;
[7] function AccumulateArray (var Arr: TDouble3DArray; Src: TDouble3DArray; Wgt: double): integer;
[8] function AccumulateArray (var Arr: TDouble4DArray; Src: TDouble4DArray; Wgt: double): integer;

The function AccumulateArray adds the weighted array Src to the array Arr. The elements of the array Src are multiplied by weight factor Wgt. This way it is possible not only to add but also to subtract the array Src.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Arr or Src has size zero
-2 ... Arr and Src are not equal in size



Last Update: 2023-Feb-06