Skip to content

Commit

Permalink
Fix PriorityQueue construction doc and docstring (#406)
Browse files Browse the repository at this point in the history
* Update priority-queue.md

Closes #340

* Update priorityqueue.jl
  • Loading branch information
scls19fr authored and ararslan committed Jul 30, 2018
1 parent d6ee8e0 commit 41cab4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/src/priority-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ efficiently.
Usage:

```julia
PriorityQueue(K, V) # construct a new priority queue with keys of type K and priorities of type V
PriorityQueue(K, V, ord) # construct a new priority queue with the given types and ordering
PriorityQueue{K, V}() # construct a new priority queue with keys of type K and priorities of type V (forward ordering by default)
PriorityQueue{K, V}(ord) # construct a new priority queue with the given types and ordering ord (Base.Order.Forward or Base.Order.Reverse)
enqueue!(pq, k, v) # insert the key k into pq with priority v
enqueue!(pq, k=>v) # (same, using Pairs)
dequeue!(pq) # remove and return the lowest priority key
Expand Down
2 changes: 1 addition & 1 deletion src/priorityqueue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# -------------

"""
PriorityQueue(K, V, [ord])
PriorityQueue{K, V}([ord])
Construct a new [`PriorityQueue`](@ref), with keys of type
`K` and values/priorites of type `V`.
Expand Down

0 comments on commit 41cab4a

Please sign in to comment.