FUNCTION: IsBorder - test whether the argument is a border of a partition
CALLING SEQUENCE:
- IsBorder(expr)
- TYP[IsBorder](expr)
-
PARAMETERS:
- expr = any expression
SYNOPSIS:
- The IsBorder function tests whether expr is a border list, 0 denoting an
horizontal segment of the border, 1 a vertical one. Extremity segments
shall not be included (i.e. 1 on the left top, 0 on the right bottom).
- When called with a second argument 'alphabet'=m, where m is list of two
elements, IsBorder returns the same, m[1] denoting an horizontal segment
of the border, m[2] a vertical one.
- Whenever there is a conflict between the function name IsBorder and
another name used in the same session, use the long form TYP['IsBorder'].
EXAMPLES:
> with(TYP):
> IsBorder([0,1,0]);
false
> IsBorder([0,1,0,0,1,1]);
true
> IsBorder([a,b,a,a,b,b], 'alphabet'=[a,b]);
true
SEE ALSO: IsPart IsDiagonal