-
-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #23706: allow several implementations of matrices in MatrixSpace
The aim of this ticket is to revamp the `MatrixSpace` constructor in order to be able to choose the implementation. For example, with the attached branch one can have access to 2 implementations of integer matrices {{{ sage: MatrixSpace(ZZ, 3, implementation='flint') Full MatrixSpace of 3 by 3 dense matrices over Integer Ring sage: MatrixSpace(ZZ, 3, implementation='generic') Full MatrixSpace of 3 by 3 dense matrices over Integer Ring (using Matrix_generic_dense) }}} One important change is the move of the method `_get_matrix_class` of `MatrixSpace` as an independent function. A problem arose with `CartanMatrix` (in `sage/combinat/root_system/cartan_matrix.py`). The class `CartanMatrix` inherits from `Matrix_integer_sparse` but does not properly redefines the parent. As a consequence of the changes here, many matrix operations are not valid anymore for inherited types (mostly submatrices operations such as `__getitem__` with slices or `stack`). A fix is provided by defining `CartanMatrix.matrix_space`. follow up: #23714 (implementation of gap matrices) URL: https://trac.sagemath.org/23706 Reported by: vdelecroix Ticket author(s): Vincent Delecroix Reviewer(s): Jean-Philippe Labbé, Travis Scrimshaw
- Loading branch information
Showing
11 changed files
with
654 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.