|
From: | Jordi Gutiérrez Hermoso |
Subject: | [Octave-bug-tracker] [bug #39378] randperm cannot handle large arguments |
Date: | Tue, 02 Jul 2013 19:40:12 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Firefox/10.0.12 |
Follow-up Comment #2, bug #39378 (project octave): I had some reason for capping the size of M. My reasoning was that if M was big enough, you might as well just allocate the full vector for speed. Perhaps a more sophisticated approach would be to do bool short_shuffle = (m < n/5 && m < 1e5) || double(m) > double(std::numeric_limits<octave_idx_type>::max()); ? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?39378> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |