MultiDictionary(S)

aggcat.spad line 503 [edit on github]

A multi-dictionary is a dictionary which may contain duplicates. As for any dictionary, its size is assumed large so that copying (non-destructive) operations are generally to be avoided.

# : % -> NonNegativeInteger if % has finiteAggregate
from Aggregate
= : (%, %) -> Boolean
from BasicType
any? : (Mapping(Boolean, S), %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate(S)
coerce : % -> 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 % has finiteAggregate
from HomogeneousAggregate(S)
count : (Mapping(Boolean, S), %) -> NonNegativeInteger if % has finiteAggregate
from HomogeneousAggregate(S)
dictionary : () -> %
from DictionaryOperations(S)
dictionary : List(S) -> %
from DictionaryOperations(S)
duplicates : % -> List(Record(entry : S, count : NonNegativeInteger))

duplicates(d) returns a list of values which have duplicates in d

empty : () -> %
from Aggregate
empty? : % -> Boolean
from Aggregate
eq? : (%, %) -> Boolean
from Aggregate
eval : (%, S, S) -> % if S has Evalable(S)
from InnerEvalable(S, S)
eval : (%, Equation(S)) -> % if S has Evalable(S)
from Evalable(S)
eval : (%, List(S), List(S)) -> % if S has Evalable(S)
from InnerEvalable(S, S)
eval : (%, List(Equation(S))) -> % if S has Evalable(S)
from Evalable(S)
every? : (Mapping(Boolean, S), %) -> Boolean if % has finiteAggregate
from HomogeneousAggregate(S)
extract! : % -> S
from BagAggregate(S)
find : (Mapping(Boolean, S), %) -> Union(S, "failed")
from Collection(S)
insert! : (S, %) -> %
from BagAggregate(S)
insert! : (S, %, NonNegativeInteger) -> %

insert!(x, d, n) destructively inserts n copies of x into dictionary d.

inspect : % -> S
from BagAggregate(S)
latex : % -> String
from SetCategory
less? : (%, NonNegativeInteger) -> Boolean
from Aggregate
map : (Mapping(S, S), %) -> %
from HomogeneousAggregate(S)
map! : (Mapping(S, S), %) -> %
from HomogeneousAggregate(S)
max : % -> S if S has OrderedSet and % has finiteAggregate
from HomogeneousAggregate(S)
max : (Mapping(Boolean, S, S), %) -> S if % has finiteAggregate
from HomogeneousAggregate(S)
member? : (S, %) -> Boolean if % 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 : (Mapping(S, S, S), %) -> S if % has finiteAggregate
from Collection(S)
reduce : (Mapping(S, S, S), %, S) -> S if % has finiteAggregate
from Collection(S)
reduce : (Mapping(S, S, S), %, S, S) -> S if % has finiteAggregate
from Collection(S)
remove : (S, %) -> % if % has finiteAggregate
from Collection(S)
remove : (Mapping(Boolean, S), %) -> % if % has finiteAggregate
from Collection(S)
remove! : (S, %) -> % if % has finiteAggregate
from DictionaryOperations(S)
remove! : (Mapping(Boolean, S), %) -> % if % has finiteAggregate
from DictionaryOperations(S)
removeDuplicates : % -> % if % has finiteAggregate
from Collection(S)
removeDuplicates! : % -> %

removeDuplicates!(d) destructively removes any duplicate values in dictionary d.

sample : () -> %
from Aggregate
select : (Mapping(Boolean, S), %) -> % if % has finiteAggregate
from Collection(S)
select! : (Mapping(Boolean, S), %) -> % if % has finiteAggregate
from DictionaryOperations(S)
size? : (%, NonNegativeInteger) -> Boolean
from Aggregate
~= : (%, %) -> Boolean
from BasicType

BagAggregate(S)

BasicType

shallowlyMutable

DictionaryOperations(S)

Collection(S)

SetCategory

HomogeneousAggregate(S)

Evalable(S)

CoercibleTo(OutputForm)

Aggregate

ConvertibleTo(InputForm)

InnerEvalable(S, S)