Algosim documentation: IsReversal

IsReversal

Tests if a matrix is a reversal matrix.

Syntax

Description

If A is a matrix then IsReversal(A, ε) is true iff A is square and A[i, j] is equal to 1 if i = n − j + 1 and equal to 0 otherwise (all comparisons made with epsilon ε).

Examples

IsReversal(❨❨0, 0, 1❩, ❨0, 1, 0❩, ❨1, 0, 0❩❩)
true

See also