BagAggregate SΒΆ

aggcat.spad line 250

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.

=: (%, %) -> Boolean if S has SetCategory or S has BasicType and % has finiteAggregate
from BasicType
~=: (%, %) -> Boolean if S has SetCategory or S has BasicType and % has finiteAggregate
from BasicType
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
copy: % -> %
from Aggregate
count: (S, %) -> NonNegativeInteger if S has BasicType and % has finiteAggregate
from HomogeneousAggregate S
empty: () -> %
from Aggregate
empty?: % -> Boolean
from Aggregate
eq?: (%, %) -> Boolean
from Aggregate
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)
extract!: % -> S
extract!(u) destructively removes a (random) item from bag u.
find: (S -> Boolean, %) -> Union(S, failed)
from Collection S
hash: % -> SingleInteger if S has SetCategory
from SetCategory
hashUpdate!: (HashState, %) -> HashState if S has SetCategory
from SetCategory
insert!: (S, %) -> %
insert!(x, u) inserts item x into bag u.
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
member?: (S, %) -> Boolean if S has BasicType and % has finiteAggregate
from HomogeneousAggregate S
more?: (%, NonNegativeInteger) -> Boolean
from Aggregate
reduce: ((S, S) -> S, %, S, S) -> S if S has BasicType and % 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
sample: %
from Aggregate
size?: (%, NonNegativeInteger) -> Boolean
from Aggregate

Aggregate

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

CoercibleTo OutputForm if S has CoercibleTo OutputForm

Collection S

ConvertibleTo InputForm if S has ConvertibleTo InputForm

Evalable S if S has Evalable S and S has SetCategory

HomogeneousAggregate S

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

SetCategory if S has SetCategory

shallowlyMutable