[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60364] New option "unique" for perms
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #60364] New option "unique" for perms |
Date: |
Tue, 24 May 2022 22:11:46 -0400 (EDT) |
Update of bug #60364 (project octave):
Status: None => Patch Submitted
Summary: Takes too much memory to call unique(perms(...)), so
here's a new function uniqueperms => New option "unique" for perms
_______________________________________________________
Follow-up Comment #3:
It didn't look like anyone was working on this, and I had a similar problem
myself, so I went ahead and implemented it using a very different technique.
It uses much less memory than unique (perms (...), "rows"), and for certain
inputs it is actually faster. E.g. for v = [1 1 1 1 2 2 2 3 3 3],
unique(perms(v),"rows")) takes 0.670 seconds while perms (v, "unique") takes
only 0.037 seconds.
Patch attached with some BISTs. Passes make check.
I am also retitling this report.
(file #53253)
_______________________________________________________
Additional Item Attachment:
File name: perms.patch Size:5 KB
<https://file.savannah.gnu.org/file/perms.patch?file_id=53253>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60364>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60364] New option "unique" for perms,
Arun Giridhar <=