SegmentExpansionCategory(S, L)

seg.spad line 50 [edit on github]

This category provides an interface for expanding segments to a stream of elements.

+ : (%, S) -> %
from SegmentCategory(S)
+ : (S, %) -> %
from SegmentCategory(S)
- : (%, S) -> %
from SegmentCategory(S)
= : (%, %) -> Boolean
from BasicType
BY : (%, Integer) -> %
from SegmentCategory(S)
SEGMENT : (S, S) -> %
from SegmentCategory(S)
coerce : % -> OutputForm
from CoercibleTo(OutputForm)
convert : S -> %
from SegmentCategory(S)
convert : % -> InputForm if S has ConvertibleTo(InputForm)
from ConvertibleTo(InputForm)
expand : % -> L

expand(l..h by k) creates value of type L with elements l, l+k, ... lN where lN <= h < lN+k. For example, expand(1..5 by 2) = [1, 3, 5].

expand : List(%) -> L

expand(l) creates a new value of type L in which each segment l..h by k is replaced with l, l+k, ... lN, where lN <= h < lN+k. For example, expand [1..4, 7..9] = [1, 2, 3, 4, 7, 8, 9].

high : % -> S
from SegmentCategory(S)
incr : % -> Integer
from SegmentCategory(S)
latex : % -> String
from SetCategory
low : % -> S
from SegmentCategory(S)
map : (Mapping(S, S), %) -> L

map(f, l..h by k) produces a value of type L by applying f to each of the successive elements of the segment, that is, [f(l), f(l+k), ..., f(lN)], where lN <= h < lN+k.

reverse : % -> %
from SegmentCategory(S)
segment : (S, S) -> %
from SegmentCategory(S)
~= : (%, %) -> Boolean
from BasicType

SegmentCategory(S)

CoercibleTo(OutputForm)

ConvertibleTo(InputForm)

SetCategory

BasicType