Algosim documentation: IsCirculant

IsCirculant

Tests if a matrix is circulant.

Syntax

Description

If A is a matrix, then IsCirculant(A, ε) returns true iff A is a circulant matrix, that is, iff each row is equal to the previous row rotated one element to the right. Floating-point comparisons are made with epsilon ε.

Note that IsCirculant(A, ε) might be true even if A is not square.

Examples

A ≔ ❨❨1, 4, 1, 5, 9, 2❩, ❨2, 1, 4, 1, 5, 9❩, ❨9, 2, 1, 4, 1, 5❩, ❨5, 9, 2, 1, 4, 1❩❩
⎛1  4  1  5  9  2⎞
⎜2  1  4  1  5  9⎟
⎜9  2  1  4  1  5⎟
⎝5  9  2  1  4  1⎠
IsCirculant(A)
true

See also