PriorityQueueAggregate(S)

aggcat.spad line 395 [edit on github]

A priority queue is a bag of items from an ordered set where the item extracted is always the maximum element.

# : % -> NonNegativeInteger
from Aggregate
= : (%, %) -> Boolean
from BasicType
any? : (Mapping(Boolean, S), %) -> Boolean
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
from HomogeneousAggregate(S)
count : (Mapping(Boolean, S), %) -> NonNegativeInteger
from HomogeneousAggregate(S)
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
from HomogeneousAggregate(S)
extract! : % -> S
from BagAggregate(S)
find : (Mapping(Boolean, S), %) -> Union(S, "failed")
from Collection(S)
insert! : (S, %) -> %
from BagAggregate(S)
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

max(q) returns the maximum element of priority queue q.

max : (Mapping(Boolean, S, S), %) -> S
from HomogeneousAggregate(S)
member? : (S, %) -> Boolean
from HomogeneousAggregate(S)
members : % -> List(S)
from HomogeneousAggregate(S)
merge : (%, %) -> %

merge(q1, q2) returns combines priority queues q1 and q2 to return a single priority queue q.

merge! : (%, %) -> %

merge!(q, q1) destructively changes priority queue q to include the values from priority queue q1.

min : % -> S
from HomogeneousAggregate(S)
more? : (%, NonNegativeInteger) -> Boolean
from Aggregate
parts : % -> List(S)
from HomogeneousAggregate(S)
reduce : (Mapping(S, S, S), %) -> S
from Collection(S)
reduce : (Mapping(S, S, S), %, S) -> S
from Collection(S)
reduce : (Mapping(S, S, S), %, S, S) -> S
from Collection(S)
remove : (S, %) -> %
from Collection(S)
remove : (Mapping(Boolean, S), %) -> %
from Collection(S)
removeDuplicates : % -> %
from Collection(S)
sample : () -> %
from Aggregate
select : (Mapping(Boolean, S), %) -> %
from Collection(S)
size? : (%, NonNegativeInteger) -> Boolean
from Aggregate
~= : (%, %) -> Boolean
from BasicType

BagAggregate(S)

BasicType

shallowlyMutable

HomogeneousAggregate(S)

Collection(S)

SetCategory

finiteAggregate

CoercibleTo(OutputForm)

Aggregate

ConvertibleTo(InputForm)

InnerEvalable(S, S)

Evalable(S)