sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.44k stars 481 forks source link

Common numerical matrix base class #7920

Open ec97c818-c7da-4a8b-aa6b-7b49474243a2 opened 14 years ago

ec97c818-c7da-4a8b-aa6b-7b49474243a2 commented 14 years ago

Currently, Matrix_double_dense inherits from Matrix_dense and Matrix_double_sparse from Matrix_sparse. However numerical matrices share a lot compared to other matrices and should probably have a common base class:

Luckily, Matrix_dense/sparse offers little in terms of implementation for numerical matrices (the exception is the hash value -- which is useless for numerical matrices anyway, but should be implemented).

In the future, there might be diagonal, Hermitian, triangular, banded etc. matrices, and then it makes even more sense to change the hierarchy, so that sparse/dense isn't a superclass.

So, this ticket should result in:

Incidentally, this is likely to result in:

Component: linear algebra

Issue created by migration from https://trac.sagemath.org/ticket/7920

ec97c818-c7da-4a8b-aa6b-7b49474243a2 commented 14 years ago

Attachment: 7920-preview.patch.gz

ec97c818-c7da-4a8b-aa6b-7b49474243a2 commented 14 years ago
comment:1

The patch is very much unfinished. There's some stuff that likely belongs to a seperate patch. The interesting part is matrix_numerical.pyx, and the fact that Matrix_double_sparse is "converted" to it as a base class.