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



EdgeVector


Unit: SDL_openarrays
Class: none
Declaration: [1] function EdgeVector (Src: TInt2DArray; Orient: TOrientation; EdgeOp: TEdgeOp; var Dest: TDoubleArray): integer;
[2] function EdgeVector (Src: TDouble2DArray; Orient: TOrientation; EdgeOp: TEdgeOp; var Dest: TDoubleArray): integer;
[3] function EdgeVector (Src: TInt2DArray; Orient: TOrientation; EdgeOp: TEdgeOp; EdgeIx: TIntArray; var Dest: TDoubleArray): integer;
[4] function EdgeVector (Src: TDouble2DArray; Orient: TOrientation; EdgeOp: TEdgeOp; EdgeIx: TIntArray; var Dest: TDoubleArray): integer;

Depending on the parameter EdgeOp the function EdgeVector calculates the minimum, the maximum, the sum, the mean or the standard deviation of all columns (Orient = orHoriz) or all rows (Orient = orVert) of the array Src (versions [1] and [2]). The results are stored in the array Dest, whose size is automatically adjusted to the corresponding edge of the Src array.

Versions [3] and [4] allow you to select specific columns or rows to be processed by storing the column/row indices in the array EdgeIx. Leaving the parameter EdgeIx empty (length = 0) is a shorthand notation for including all columns/rows. Thus, for example, the statement EdgeVector (MySrc, orHoriz, eopSum, [], EdgeVec); is equivalent to EdgeVector (MySrc, orHoriz, eopSum, EdgeVec);. Please note that the indices of the columns and rows are 0-based.

The function returns the following error codes:

 0 ... everything is OK
-1 ... Src has a dimension less than 1
-2 ... EdgeIx contains invalid column/row numbers

Example: The following statement calculates the means of the values in the columns 2,3,7,8 and 10 for all rows of the Array MyArray and stores them in the array MyEdgeVec:
EdgeVector (MyArray, orVert, eopMean, [2,3,4,8,10], MyEdgeVec);

 



Last Update: 2023-Feb-06