BagAggregate SΒΆ
aggcat.spad line 272 [edit on github]
S: Type
A bag aggregate is an aggregate for which one can insert and extract objects, and where the order in which objects are inserted determines the order of extraction. Examples of bags are stacks, queues, and dequeues.
- #: % -> NonNegativeInteger if % has finiteAggregate
from Aggregate
- =: (%, %) -> Boolean if S has BasicType and % has finiteAggregate or S has SetCategory
from BasicType
- ~=: (%, %) -> Boolean if S has BasicType and % has finiteAggregate 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
- construct: List S -> %
from Collection S
- convert: % -> InputForm if S has ConvertibleTo InputForm
from ConvertibleTo InputForm
- count: (S -> Boolean, %) -> NonNegativeInteger if % has finiteAggregate
from HomogeneousAggregate S
- count: (S, %) -> NonNegativeInteger if S has BasicType and % has finiteAggregate
from HomogeneousAggregate S
- eval: (%, Equation S) -> % if S has Evalable S and S has SetCategory
from Evalable S
- eval: (%, List Equation S) -> % if S has Evalable S and S has SetCategory
from Evalable S
- eval: (%, List S, List S) -> % if S has Evalable S and S has SetCategory
from InnerEvalable(S, S)
- eval: (%, S, S) -> % if S has Evalable S and S has SetCategory
from InnerEvalable(S, S)
- every?: (S -> Boolean, %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate S
- extract!: % -> S
extract!(u)
destructively removes a (random) item from bagu
.
- find: (S -> Boolean, %) -> Union(S, failed)
from Collection S
- insert!: (S, %) -> %
insert!(x, u)
inserts itemx
into bagu
.
- inspect: % -> S
inspect(u)
returns an (random) element from a bag.
- latex: % -> String if S has SetCategory
from SetCategory
- less?: (%, NonNegativeInteger) -> Boolean
from Aggregate
- map!: (S -> S, %) -> %
from HomogeneousAggregate S
- map: (S -> S, %) -> %
from HomogeneousAggregate S
- max: % -> S if S has OrderedSet and % has finiteAggregate
from HomogeneousAggregate S
- max: ((S, S) -> Boolean, %) -> S if % has finiteAggregate
from HomogeneousAggregate S
- member?: (S, %) -> Boolean if S has BasicType and % has finiteAggregate
from HomogeneousAggregate S
- members: % -> List S if % has finiteAggregate
from HomogeneousAggregate S
- min: % -> S if S has OrderedSet and % has finiteAggregate
from HomogeneousAggregate S
- more?: (%, NonNegativeInteger) -> Boolean
from Aggregate
- parts: % -> List S if % has finiteAggregate
from HomogeneousAggregate 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 S has BasicType and % has finiteAggregate
from Collection S
- remove: (S -> Boolean, %) -> % if % has finiteAggregate
from Collection S
- remove: (S, %) -> % if S has BasicType and % has finiteAggregate
from Collection S
- removeDuplicates: % -> % if S has BasicType and % has finiteAggregate
from Collection S
- select: (S -> Boolean, %) -> % if % has finiteAggregate
from Collection S
- size?: (%, NonNegativeInteger) -> Boolean
from Aggregate
BasicType if S has SetCategory or S has BasicType and % has finiteAggregate
CoercibleTo OutputForm if S has CoercibleTo OutputForm
ConvertibleTo InputForm if S has ConvertibleTo InputForm
Evalable S if S has Evalable S and S has SetCategory
InnerEvalable(S, S) if S has Evalable S and S has SetCategory
SetCategory if S has SetCategory