Just a note: unlike c++, but like python, an OrderedDict maintains insertion order, not sort order. A SortedDict does maintain sort order, however. Both are in DataStructures.jl.
Cheers, Kevin On Friday, May 29, 2015, Scott Jones <[email protected] <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > Ah, another great suggestion! Thanks! > > On Friday, May 29, 2015 at 7:06:09 PM UTC+2, Seth wrote: >> >> >> >> On Friday, May 29, 2015 at 7:06:09 AM UTC-7, Scott Jones wrote: >>> >>> Great! Thanks! That also sounds like it will help with something that >>> just came up today, somebody else wanted to know how to do just that also >>> (I'm proselytizing here in Belgium, getting everybody into Julia!) >>> >>> >> Another way that I recently discovered is to use sortperm(): basically, >> given an unsorted vector of sortable values (like frequencies), sortperm >> will return a vector of integers representing the indices of the original >> vector in sorted order. That is, >> >> sortperm([1.1, 5.5, 4.4, 2.2]) will return [1,4,3,2]. >> >> It's also very fast (I used it to replace 5 lines of code in LightGraphs >> and sped up betweenness centrality by over 60%). >> >
