If you need to do subseq on the key space, you could do the following:
(def pm-empty (PersistentPriorityMap. (sorted-map) (sorted-map) {} nil))

This sets up the priority map to use sorted maps for both associating keys
to values and values to keys.

Use this as your base priority map to pour new key-value pairs into.  Then,
you can extract the underlying key-value sorted map with (.item->priority
pm) and call subseq on it to perform the subseq on keys.

Once you're using sorted maps for both the keys and values though, you
might want to look at the PSQ data structure you referred to which was
built with this kind of range searching on both keys and values as a
primary objective.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to