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_matrix
Class: TMatrix, TIntMatrix
Declaration: [1] procedure EdgeVector (Orient: TOrientation; EdgeOp: TEdgeOp; var DestVec: TVector);
[2] function EdgeVector (Orient: TOrientation; EdgeOp: TEdgeOp; EdgeIx: TIntArray; var DestVec: TVector): integer;

Depending on the parameter EdgeOp the method 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 matrix (version [1]). The results are stored in the vector Destvec, whose size is automatically adjusted to the corresponding edge of the matrix.

Version [2] allows 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 MyMat.EdgeVector (orHoriz, eopSum, [], EdgeVec); is equivalent to MyMat.EdgeVector (orHoriz, eopSum, EdgeVec);. Please note that the indices of the columns and rows are 1-based.

The function in version [2] returns the following error codes:

 0 ... everything is OK
-1 ... the matrix 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 matrix MatA and stores them in the vector MVec:
MatA.EdgeVector (orVert, eopMean, [2,3,4,8,10], MVec);

 



Last Update: 2023-Feb-06