Algosim documentation: DeletedAbsoluteRowSum

DeletedAbsoluteRowSum

Returns a deleted absolute row sum of a matrix.

Syntax

Description

If A is a matrix, not necessarily square, and n is a valid row index in A, then DeletedAbsoluteRowSum(A, n) is the nth deleted absolute row sum of A, that is, the sum of the absolute values of all entries on the nth row of A except the diagonal entry (if any). (In a tall matrix, not every row has a diagonal entry.)

Examples

A ≔ ❨❨5, 1, 2, 1, 0❩, ❨2, 7, 1, 1, 0❩, ❨0, 1, 5, 0, 3❩, ❨1, 2, 1, 6, 1❩, ❨2, 1, 5, 0, 9❩❩
⎛5  1  2  1  0⎞
⎜2  7  1  1  0⎟
⎜0  1  5  0  3⎟
⎜1  2  1  6  1⎟
⎝2  1  5  0  9⎠
compute(DeletedAbsoluteRowSum(A, n), n, 1, size(A).rows)
4
4
4
5
8

See also