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

min(PriorityQueue) -- return the minimum element of the queue

Synopsis

Description

i1 : Q = priorityQueue {1,5,2,-3,0}

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

o1 : PriorityQueue
i2 : min Q

o2 = -3

Caveat

If the queue is empty, null is returned.

Ways to use this method: