Fork me on GitHub
#core-matrix
<
2017-05-29
>
mikera02:05:56

I would use something like:

mikera02:05:58

(let [m [[1 2] [3 4]] max (emax m)] (filter #(= max (apply mget m %)) (index-seq m)))

mikera02:05:38

Would be more efficient to do this with something like ereduce-indexed but we haven't implemented that yet 🙂

octahedrion05:05:00

yeh I'm using index-seq but that's linear & I was hoping for a logarithmic solution - like, if the matrix were stored as a tree

octahedrion05:05:36

your fn is shorter than mine though so I'll use it 🙂

octahedrion05:05:15

i was doing the reduce - though interestingly according to criterium they're almost exactly the same