SegmentCategory SΒΆ
seg.spad line 1 [edit on github]
S: Type
This category provides operations on ranges, or segments as they are called.
- +: (%, S) -> % if S has AbelianSemiGroup
(l..h)+ireturns segmentl+i .. h+i.
- +: (S, %) -> % if S has AbelianSemiGroup
i+(l..h)returns segmenti+l .. i+h.
- -: (%, S) -> % if S has AbelianGroup
(l..h)-ireturns segmentl-i .. h-i.
- =: (%, %) -> Boolean if S has SetCategory
from BasicType
- ~=: (%, %) -> Boolean if S has SetCategory
from BasicType
- BY: (%, Integer) -> %
s by ncreates a new segment in which only everyn-th element is used.
- coerce: % -> OutputForm if S has SetCategory
from CoercibleTo OutputForm
- convert: % -> InputForm if S has ConvertibleTo InputForm
from ConvertibleTo InputForm
- convert: S -> %
convert(i)creates the segmenti..i.
- high: % -> S
high(s)returns the second endpoint ofs. Note:high(l..h) = h.
- incr: % -> Integer
incr(s)returnsn, wheresis a segment in which everyn-th element is used. Note:incr(l..h by n) = n.
- latex: % -> String if S has SetCategory
from SetCategory
- low: % -> S
low(s)returns the first endpoint ofs. Note:low(l..h) = l.
- reverse: % -> % if S has OrderedRing
reverse(s)returns segmentsin reverse order.
- segment: (S, S) -> %
segment(i, j)is an alternate way to create the segmenti..j.
- SEGMENT: (S, S) -> %
l..hcreates a segment withlandhas the endpoints.
BasicType if S has SetCategory
CoercibleTo OutputForm if S has SetCategory
ConvertibleTo InputForm if S has ConvertibleTo InputForm
SetCategory if S has SetCategory