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

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

[Octave-bug-tracker] [bug #60364] Takes too much memory to call unique(p


From: anonymous
Subject: [Octave-bug-tracker] [bug #60364] Takes too much memory to call unique(perms(...)), so here's a new function uniqueperms
Date: Fri, 9 Apr 2021 21:20:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0

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

                 Summary: Takes too much memory to call unique(perms(...)), so
here's a new function uniqueperms
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sat 10 Apr 2021 01:20:25 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Performance
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:

Calling

unique (perms (foo), "rows")

takes at least as much memory as N! and likely more when doing the sorting and
unique operation. This is inconvenient for long vectors with many repeated
elements where the small final result is prevented by the calculation of a
large intermediate.

Here is a proposed function uniqueperms() to address that behavior. Feedback
requested please.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 10 Apr 2021 01:20:25 AM UTC  Name: uniqueperms.m  Size: 3KiB   By:
None

<http://savannah.gnu.org/bugs/download.php?file_id=51222>

    _______________________________________________________

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]