// Elems return all elements in queue
Elems return all elements in queue
// Elems return all elements in queue
func (pq *PriorityQueue) Elems() []*Entry {
	rs := make([]*Entry, pq.Len())
	count := 0
	pq.btree.Descend(func(i btree.Item) bool {
		rs[count] = i.(*Entry)
		count++
		return true
	})
	return rs
}
func ( pq * PriorityQueue ) Elems ( ) [ ] * Entry { rs := make ( [ ] * Entry , pq . Len ( ) ) count := 0 pq . btree . Descend ( func ( i btree . Item ) bool { rs [ count ] = i . ( * Entry ) count ++ return true } ) return rs }
Elems return all elements in queue
Elems return all elements in queue