[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45518] randsample not implemented (implementa
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #45518] randsample not implemented (implementation supplied) |
Date: |
Sat, 11 Jul 2015 02:36:02 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 |
Follow-up Comment #3, bug #45518 (project octave):
Thanks, Nir. I didn't notice your implementation -- I checked for it in 3.8.2
instead of 4.0.0 / development.
The attached patch:
- fixes a bug that prevents sampling k from n<k with replacement
- implements weighted sampling without replacement, which is also missing from
Matlab, but should really be there
- puts brackets around if/while conditions, which I was told is an Octave
coding standard.
(file #34423)
_______________________________________________________
Additional Item Attachment:
File name: randsample.patch Size:3 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45518>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/