Algosim documentation: IsCol

IsCol

Tests if a two-dimensional container has width 1.

Syntax

Description

IsCol(X) returns true iff width(X) = 1.

Examples

A ≔ ❨❨5, 1, 2❩, ❨4, 7, 5❩, ❨0, 2, 1❩❩
⎛5  1  2⎞
⎜4  7  5⎟
⎝0  2  1⎠
B ≔ ❨❨4, 7, 6❩❩
(4  7  6)
C ≔ ❨❨1❩, ❨2❩, ❨7❩❩
⎛1⎞
⎜2⎟
⎝7⎠
'(IsCol(A), IsCol(B), IsCol(C))
false
false
true

See also