[Top][All Lists]

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

[Octave-bug-tracker] [bug #41796] Generalize sub2ind and ind2sub or prov

From: Juan Pablo Carbajal
Subject: [Octave-bug-tracker] [bug #41796] Generalize sub2ind and ind2sub or provide specialized functions
Date: Thu, 06 Mar 2014 23:00:05 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36


                 Summary: Generalize sub2ind and ind2sub or provide
specialized functions
                 Project: GNU Octave
            Submitted by: juanpi
            Submitted on: Thu 06 Mar 2014 11:00:03 PM GMT
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Feature Request
                  Status: None
             Assigned to: None
         Originator Name: juanpi
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any



=== extend sub2ind and ind2sub ===
It could be useful to extend sub2ind and ind2sub to work with triangular
matrices. Currently private functions of the mechanics package.
A string argument triggers the behavior. The string argument can be "triu" or
"tril". After this str argument we accept an extra scalar value indicating
that the triangular matrix is off diagonal (as in tril and triu).

So, the first modification to the C++ code will be
# Check if any of the argument is a str.
# Check what kind of triangular matrix (up or low). 
# If the argument after the str argument is a scalar, it indicates off
diagonal triangular matrix (we do not have algo for that yet, though).

This changes should keep the compatibility with Matlab functions.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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