seg.spad line 1 [edit on github]
This category provides operations on ranges, or segments as they are called.
(l..h)
returns segment +i
l+i .. h+i
.
i+(l..h)
returns segment i+l .. i+h
.
(l..h)
returns segment -i
l-i .. h-i
.
s by n
creates a new segment in which only every n
-
th element is used.
l..h
creates a segment with l
and h
as the endpoints.
convert(i)
creates the segment i..i
.
high(s)
returns the second endpoint of s
. Note: high(l..h) = h
.
incr(s)
returns n
, where s
is a segment in which every n
-
th element is used. Note: incr(l..h by n) = n
.
low(s)
returns the first endpoint of s
. Note: low(l..h) = l
.
reverse(s)
returns segment s
in reverse order.
segment(i, j)
is an alternate way to create the segment i..j
.