octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #50426] perms() sort order different than Matl


From: anonymous
Subject: [Octave-bug-tracker] [bug #50426] perms() sort order different than Matlab
Date: Mon, 6 Mar 2017 03:47:47 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0

Follow-up Comment #15, bug #50426 (project octave):

Then let's say in the second paragraph of the documentation

Results are returned in inverse lexicographic order. Possible repetitions of
entries are neglected, that is, the result has always size @code{factorial
(@var{n}) * @var{n}}, where @var{n} is the length of @var{v}. For generating
only differing permutations use @code{unique (perms (@var{v}),
"rows")(end:-1:1,:)}.

Of course, this is now again a point where it would be more efficient to do
this natively in the algorithm as opposed to afterwards. This non-matlab
behaviour could be invoked by an additional argument to perms, but I think we
wait until somebody really wants this, right?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?50426>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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