[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60364] New option "unique" for perms

From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #60364] New option "unique" for perms
Date: Mon, 20 Jun 2022 03:10:46 -0400 (EDT)

Follow-up Comment #8, bug #60364 (project octave):

With a one-line change (a sortrows() on the index array) the tests pass. It
does take a bit of efficiency, but it is still much faster than Arun's
implementation, also much faster than unique(perms(v),"rows"), and it has the
advantage that the restriction of reverse lexicographic ordering holding only
when "unique" is not given is not needed any more. Also, when the input vector
has no repetitions, specifying "unique" or not gives the same result (only
takes longer). For efficiency, I reintroduced the old code for the non-unique

(file #53323)


Additional Item Attachment:

File name: perms_m.m                      Size:7 KB


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]