Hi All,
I currently have data stored in a hash-map as follows:
(atom
{ [1 2] value 1,
[1 3] value 2,
[4 5] value 3
[4 6] value 4
})
I need to identify entries in this map where *either* the first or the
second value in the key matches a predicate.
(swap! my-map dissoc 1)
= {
[4 5]
On Sat, 2011-12-03 at 13:14 -0800, Base wrote:
I need to identify entries in this map where *either* the first or the
second value in the key matches a predicate.
Unfortunately, you can only have one notion of key equality per map, so
you need to either introduce some linear-search component
I don't know what data the vectors depict, but if they are like floating
point numbers and you want to do distances etc (like geodata), and need
high performance on various strange matchings you should consider something
like R-trees
http://en.wikipedia.org/wiki/R-tree
(or check if there is some