# ExtensibleLinearAggregate SΒΆ

aggcat.spad line 2168 [edit on github]

S: Type

An extensible aggregate is one which allows insertion and deletion of entries. These aggregates are models of lists which are represented by linked structures so as to make insertion, deletion, and concatenation efficient. However, access to elements of these extensible aggregates is generally slow since access is made from the end. See FlexibleArray for an exception.

- #: % -> NonNegativeInteger if % has finiteAggregate
from Aggregate

- <=: (%, %) -> Boolean if S has OrderedSet and % has finiteAggregate
from PartialOrder

- <: (%, %) -> Boolean if S has OrderedSet and % has finiteAggregate
from PartialOrder

- =: (%, %) -> Boolean if % has finiteAggregate and S has BasicType or S has SetCategory
from BasicType

- >=: (%, %) -> Boolean if S has OrderedSet and % has finiteAggregate
from PartialOrder

- >: (%, %) -> Boolean if S has OrderedSet and % has finiteAggregate
from PartialOrder

- ~=: (%, %) -> Boolean if % has finiteAggregate and S has BasicType or S has SetCategory
from BasicType

- any?: (S -> Boolean, %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate S

- coerce: % -> OutputForm if S has CoercibleTo OutputForm
from CoercibleTo OutputForm

- concat!: (%, %) -> %
`concat!(u, v)`

destructively appends`v`

to the end of`u`

.`v`

is unchanged

- concat!: (%, S) -> %
`concat!(u, x)`

destructively adds element`x`

to the end of`u`

.

- concat: (%, %) -> %
from LinearAggregate S

- concat: (%, S) -> %
from LinearAggregate S

- concat: (S, %) -> %
from LinearAggregate S

- concat: List % -> %
from LinearAggregate S

- construct: List S -> %
from Collection S

- convert: % -> InputForm if S has ConvertibleTo InputForm
from ConvertibleTo InputForm

- copyInto!: (%, %, Integer) -> % if % has finiteAggregate
from LinearAggregate S

- count: (S -> Boolean, %) -> NonNegativeInteger if % has finiteAggregate
from HomogeneousAggregate S

- count: (S, %) -> NonNegativeInteger if % has finiteAggregate and S has BasicType
from HomogeneousAggregate S

- delete!: (%, Integer) -> %
`delete!(u, i)`

destructively deletes the`i`

th element of`u`

.

- delete!: (%, UniversalSegment Integer) -> %
`delete!(u, i..j)`

destructively deletes elements`u`

.`i`

through`u`

.`j`

.

- delete: (%, Integer) -> %
from LinearAggregate S

- delete: (%, UniversalSegment Integer) -> %
from LinearAggregate S

- elt: (%, Integer) -> S
- elt: (%, Integer, S) -> S
from EltableAggregate(Integer, S)

- elt: (%, UniversalSegment Integer) -> %
from Eltable(UniversalSegment Integer, %)

- entries: % -> List S
from IndexedAggregate(Integer, S)

- entry?: (S, %) -> Boolean if % has finiteAggregate and S has BasicType
from IndexedAggregate(Integer, S)

- eval: (%, Equation S) -> % if S has SetCategory and S has Evalable S
from Evalable S

- eval: (%, List Equation S) -> % if S has SetCategory and S has Evalable S
from Evalable S

- eval: (%, List S, List S) -> % if S has SetCategory and S has Evalable S
from InnerEvalable(S, S)

- eval: (%, S, S) -> % if S has SetCategory and S has Evalable S
from InnerEvalable(S, S)

- every?: (S -> Boolean, %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate S

- fill!: (%, S) -> %
from IndexedAggregate(Integer, S)

- find: (S -> Boolean, %) -> Union(S, failed)
from Collection S

- first: % -> S
from IndexedAggregate(Integer, S)

- first: (%, NonNegativeInteger) -> %
from LinearAggregate S

- hash: % -> SingleInteger if S has SetCategory
from SetCategory

- hashUpdate!: (HashState, %) -> HashState if S has SetCategory
from SetCategory

- index?: (Integer, %) -> Boolean
from IndexedAggregate(Integer, S)

- indices: % -> List Integer
from IndexedAggregate(Integer, S)

- insert!: (%, %, Integer) -> %
`insert!(v, u, i)`

destructively inserts aggregate`v`

into`u`

at position`i`

.

- insert!: (S, %, Integer) -> %
`insert!(x, u, i)`

destructively inserts`x`

into`u`

at position`i`

.

- insert: (%, %, Integer) -> %
from LinearAggregate S

- insert: (S, %, Integer) -> %
from LinearAggregate S

- latex: % -> String if S has SetCategory
from SetCategory

- leftTrim: (%, S) -> % if % has finiteAggregate and S has BasicType
from LinearAggregate S

- less?: (%, NonNegativeInteger) -> Boolean
from Aggregate

- map!: (S -> S, %) -> %
from HomogeneousAggregate S

- map: ((S, S) -> S, %, %) -> %
from LinearAggregate S

- map: (S -> S, %) -> %
from HomogeneousAggregate S

- max: % -> S if S has OrderedSet and % has finiteAggregate
from HomogeneousAggregate S

- max: (%, %) -> % if S has OrderedSet and % has finiteAggregate
from OrderedSet

- max: ((S, S) -> Boolean, %) -> S if % has finiteAggregate
from HomogeneousAggregate S

- maxIndex: % -> Integer
from IndexedAggregate(Integer, S)

- member?: (S, %) -> Boolean if % has finiteAggregate and S has BasicType
from HomogeneousAggregate S

- members: % -> List S if % has finiteAggregate
from HomogeneousAggregate S

- merge!: (%, %) -> % if S has OrderedSet
`merge!(u, v)`

destructively merges`u`

and`v`

in ascending order.

- merge!: ((S, S) -> Boolean, %, %) -> %
`merge!(p, u, v)`

destructively merges`u`

and`v`

using predicate`p`

.

- merge: (%, %) -> % if S has OrderedSet and % has finiteAggregate
from LinearAggregate S

- merge: ((S, S) -> Boolean, %, %) -> % if % has finiteAggregate
from LinearAggregate S

- min: % -> S if S has OrderedSet and % has finiteAggregate
from HomogeneousAggregate S

- min: (%, %) -> % if S has OrderedSet and % has finiteAggregate
from OrderedSet

- minIndex: % -> Integer
from IndexedAggregate(Integer, S)

- more?: (%, NonNegativeInteger) -> Boolean
from Aggregate

- new: (NonNegativeInteger, S) -> %
from LinearAggregate S

- parts: % -> List S if % has finiteAggregate
from HomogeneousAggregate S

- position: (S -> Boolean, %) -> Integer if % has finiteAggregate
from LinearAggregate S

- position: (S, %) -> Integer if % has finiteAggregate and S has BasicType
from LinearAggregate S

- position: (S, %, Integer) -> Integer if % has finiteAggregate and S has BasicType
from LinearAggregate S

- qelt: (%, Integer) -> S
from EltableAggregate(Integer, S)

- qsetelt!: (%, Integer, S) -> S
from EltableAggregate(Integer, S)

- reduce: ((S, S) -> S, %) -> S if % has finiteAggregate
from Collection S

- reduce: ((S, S) -> S, %, S) -> S if % has finiteAggregate
from Collection S

- reduce: ((S, S) -> S, %, S, S) -> S if % has finiteAggregate and S has BasicType
from Collection S

- remove!: (S -> Boolean, %) -> %
`remove!(p, u)`

destructively removes all elements`x`

of`u`

such that`p(x)`

is`true`

.

- remove!: (S, %) -> % if S has BasicType
`remove!(x, u)`

destructively removes all values`x`

from`u`

.

- remove: (S -> Boolean, %) -> % if % has finiteAggregate
from Collection S

- remove: (S, %) -> % if % has finiteAggregate and S has BasicType
from Collection S

- removeDuplicates!: % -> % if S has BasicType
`removeDuplicates!(u)`

destructively removes duplicates from`u`

.

- removeDuplicates: % -> % if % has finiteAggregate and S has BasicType
from Collection S

- reverse!: % -> % if % has finiteAggregate
from LinearAggregate S

- reverse: % -> % if % has finiteAggregate
from LinearAggregate S

- rightTrim: (%, S) -> % if % has finiteAggregate and S has BasicType
from LinearAggregate S

- select!: (S -> Boolean, %) -> %
`select!(p, u)`

destructively changes`u`

by keeping only values`x`

such that`p(x)`

.

- select: (S -> Boolean, %) -> % if % has finiteAggregate
from Collection S

- setelt!: (%, Integer, S) -> S
from EltableAggregate(Integer, S)

- setelt!: (%, UniversalSegment Integer, S) -> S
from LinearAggregate S

- size?: (%, NonNegativeInteger) -> Boolean
from Aggregate

- smaller?: (%, %) -> Boolean if S has OrderedSet and % has finiteAggregate or S has Comparable and % has finiteAggregate
from Comparable

- sort!: % -> % if S has OrderedSet and % has finiteAggregate
from LinearAggregate S

- sort!: ((S, S) -> Boolean, %) -> % if % has finiteAggregate
from LinearAggregate S

- sort: % -> % if S has OrderedSet and % has finiteAggregate
from LinearAggregate S

- sort: ((S, S) -> Boolean, %) -> % if % has finiteAggregate
from LinearAggregate S

- sorted?: % -> Boolean if S has OrderedSet and % has finiteAggregate
from LinearAggregate S

- sorted?: ((S, S) -> Boolean, %) -> Boolean if % has finiteAggregate
from LinearAggregate S

- trim: (%, S) -> % if % has finiteAggregate and S has BasicType
from LinearAggregate S

BasicType if % has finiteAggregate and S has BasicType or S has SetCategory

CoercibleTo OutputForm if S has CoercibleTo OutputForm

Comparable if S has Comparable and % has finiteAggregate or S has OrderedSet and % has finiteAggregate

ConvertibleTo InputForm if S has ConvertibleTo InputForm

Eltable(UniversalSegment Integer, %)

Evalable S if S has SetCategory and S has Evalable S

InnerEvalable(S, S) if S has SetCategory and S has Evalable S

OrderedSet if S has OrderedSet and % has finiteAggregate

PartialOrder if S has OrderedSet and % has finiteAggregate

SetCategory if S has SetCategory