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

[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: Mon, 20 Jun 2022 14:18:29 -0400 (EDT)

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

@mleitner: I'm getting an error. Could you look into it pls?


octave:1> v = "aaaabbbbcccc"; tic; p = perms_m (v, "unique"); toc
error: transpose not defined for N-D objects
error: called from
    perms_m at line 146 column 8


That's this line:

      h=accumarray(j',1)';


Independently of that fix, I am attaching an updated version of your code.
Please review. The changes are: replacing generic `end` with `endif`; spacing
like the other Octave m-files; replacing the variable `i` with `ii`; replacing
the multiple calls to `size` with variables; replacing `size(x,1)` and
`size(x,2)` with the faster `rows(x)` and `columns(x)`.

(file #53327)

    _______________________________________________________

Additional Item Attachment:

File name: perms_edited.m                 Size:7 KB
    <https://file.savannah.gnu.org/file/perms_edited.m?file_id=53327>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60364>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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