Macaulay2 » Documentation
Packages » PriorityQueue > length(PriorityQueue)
next | previous | forward | backward | up | index | toc

length(PriorityQueue) -- returns the number of elements in the queue

Synopsis

Description

i1 : Q = priorityQueue {1,2,3}

o1 = PriorityQueue{...4...}

o1 : PriorityQueue
i2 : length Q

o2 = 3
i3 : insert(Q,0)

o3 = PriorityQueue{...4...}

o3 : PriorityQueue
i4 : length Q

o4 = 4

Ways to use this method: