Re: Accessing a Hash table as a Value-Sorted Range

2013-11-19 Thread Ali Çehreli
On 11/19/2013 02:42 PM, "Nordlöw" wrote: On Tuesday, 19 November 2013 at 21:14:01 UTC, Brad Anderson wrote: On Tuesday, 19 November 2013 at 21:11:42 UTC, Nordlöw wrote: If I have a hash-table `File[string] _subs` and want to access its values in a sorted way is there a better than simply throug

Re: Accessing a Hash table as a Value-Sorted Range

2013-11-19 Thread Nordlöw
On Tuesday, 19 November 2013 at 21:14:01 UTC, Brad Anderson wrote: On Tuesday, 19 November 2013 at 21:11:42 UTC, Nordlöw wrote: If I have a hash-table `File[string] _subs` and want to access its values in a sorted way is there a better than simply through auto ssubs = new File[_subs.lengt

Re: Accessing a Hash table as a Value-Sorted Range

2013-11-19 Thread Nordlöw
On Tuesday, 19 November 2013 at 22:42:10 UTC, Nordlöw wrote: On Tuesday, 19 November 2013 at 21:14:01 UTC, Brad Anderson wrote: On Tuesday, 19 November 2013 at 21:11:42 UTC, Nordlöw wrote: If I have a hash-table `File[string] _subs` and want to access its values in a sorted way is there a bette

Re: Accessing a Hash table as a Value-Sorted Range

2013-11-19 Thread Brad Anderson
On Tuesday, 19 November 2013 at 21:11:42 UTC, Nordlöw wrote: If I have a hash-table `File[string] _subs` and want to access its values in a sorted way is there a better than simply through auto ssubs = new File[_subs.length]; // preallocate sorted subs size_t ix = 0; foreach (sub

Accessing a Hash table as a Value-Sorted Range

2013-11-19 Thread Nordlöw
If I have a hash-table `File[string] _subs` and want to access its values in a sorted way is there a better than simply through auto ssubs = new File[_subs.length]; // preallocate sorted subs size_t ix = 0; foreach (sub; _subs) { ssubs[ix++] = sub; // set new reference to