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

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

[Octave-bug-tracker] [bug #65244] Simplify code complexity of perms.cc


From: Hendrik K
Subject: [Octave-bug-tracker] [bug #65244] Simplify code complexity of perms.cc
Date: Fri, 2 Feb 2024 22:10:21 -0500 (EST)

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

                 Summary: Simplify code complexity of perms.cc 
                   Group: GNU Octave
               Submitter: koerhen
               Submitted: Sat 03 Feb 2024 03:10:21 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 03 Feb 2024 03:10:21 AM UTC By: Hendrik K <koerhen>
Perms.cc had been originally created when the ordering of the perms output
varied by class type and was (in retro perspective) not Matlab compatible.

With the clarification (see bug #50426 for the lengthy discussion about the
reverse lexicographical ordering based on position and ignoring element
value), the code complexity can be materially reduced (40% less LOC) by
removing unused code and by using more CXX-11 features (std::iota and
constexpr allowing to merge templates).

This simplification will reduce future maintenance efforts.



          







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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