#13584: Add rcm to matrix/matrix2.pyx
-------------------------------------+-------------------------------------
Reporter: r.gaia.cs | Owner: r.gaia.cs
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.5
Component: linear algebra | Resolution:
Keywords: matrix, rcm | Merged in:
Authors: William A. Stein, | Reviewers:
Marco Mezzarobba, Rob Beezer, | Work issues: Cython issues
Frédéric Chapoton, Ralf Stephan | Commit:
Report Upstream: N/A | c3fb93fe197a6d47643fc66f7beb8cd06888c551
Branch: | Stopgaps:
public/ticket/13584 |
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Some more comments:
9. What is the point of having `_adj_list` when we already have
`nonzero_positions_in_row`? If you are not happy with the diagonal terms
you can either remove them from the output of `nonzero_positions_in_row`
or add an optional argument. You can also adapt `_adj` accordingly.
10. The design is very ugly. If you need several methods to achieve a task
then create a new class to handle them. It is a nonsense to add 6 private
very specific methods (that will furthermore not appear in the
documentation). Having an independent class can also be useful to avoid
duplication with #13583.
11. The call
{{{
if self[i,j] != 0:
...
}}}
is very slow compared to
{{{
if self.get_unsafe(i,j):
...
}}}
The latter avoids a creation of tuple, conversions between C variables
and Python variables and a coercion (the `0` in the first version is a
Python int).
--
Ticket URL: <http://trac.sagemath.org/ticket/13584#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.