You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I think that the fact that all three versions of this code are nearly identical means that a new enhancement ticket should be opened to clean up the classes here. In particular, I think the following might be a reasonable plan:
in matrix_integer_sparse, rename _matrix to _rows for consistency (and clarity -- you're getting a list of rows, not a pointer to the whole matrix)
clean up the associated vector classes (in fact, vector_modn_sparse isn't even a class right now!), and have them all inherit from an abstract class with the same methods they all share (which could all raise NotImplementedErrors, for all that matters)
make each of the sparse matrix classes have a member _rows of type vector_sparse_generic or whatever, and then move the _nonzero_positions_by_row down to the generic class.
It would get rid of this code duplication, clean things up, etc.
Currently, generic sparse matrices inherit their nonzero_positions method from matrix0.py. This should be trivial to fix.
Component: linear algebra
Keywords: sparse
Issue created by migration from https://trac.sagemath.org/ticket/4648
The text was updated successfully, but these errors were encountered: