Editing User:KaKiLa
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 66: | Line 66: | ||
== extend sub2ind and ind2sub == | == extend sub2ind and ind2sub == | ||
We are extending sub2ind and ind2sub to work with triangular matrices. Currently private functions of {{Forge|mechanics}}. | We are extending sub2ind and ind2sub to work with triangular matrices. Currently private functions of {{Forge|mechanics}}. | ||
A string argument triggers the behavior. The string argument can be "triu" or "tril". After this str argument we | A string argument triggers the behavior. The string argument can be "triu" or "tril". After this str argument we accet an extra scalar value indicating that the triangular matrix is off diagonal (as in tril and trup). | ||
So, the | So, the forst modification to the C++ code will be | ||
# Check if any of the argument is a str. | # Check if any of the argument is a str. | ||
# Check what kind of triangular matrix (up or low). | # 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). | # 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). | ||
== updating pkg.m == | == updating pkg.m == |