Design #592
Review design of ConstMatrixView
Description
After having trouble trying to implement MatXel
as a ConstMatrixView
, I think the design of ConstMatrixView
needs to be reconsidered.
Related issues
History
#1 Updated by John Abbott over 9 years ago
After having resolved #350, I have some other questions about the general design of matrices and their views.
The main question is whether matrix
should be derived from MatrixView
, or whether it would be better simply to have an implicit ctor for a MatrixView
from a matrix
. Recall that inheritance represents an "is-a" relationship; I'm not sure whether a matrix
really is a MatrixView
.
#2 Updated by John Abbott over 8 years ago
- Priority changed from Normal to High
- Target version changed from CoCoALib-1.0 to CoCoALib-0.99540 Feb 2016
I've still got problems with the new (internal) design for BlockMat2x2
. While investigating I was quite surprised to see that ConstMatrixView
uses a SmartPtrIRC
to "point" to the implementation... I'm too tired now to decide whether that's right or wrong, but it should be checked. Bear in mind also that I'm hoping to reduce the use of ref counts (to make multithreaded execution work better).
#3 Updated by John Abbott about 8 years ago
- Status changed from New to In Progress
- Assignee set to John Abbott
- Priority changed from High to Urgent
- Target version changed from CoCoALib-0.99540 Feb 2016 to CoCoALib-0.99550 spring 2017
- % Done changed from 0 to 10
#4 Updated by John Abbott over 7 years ago
- Status changed from In Progress to Closed
- % Done changed from 10 to 100
- Estimated time changed from 20.00 h to 1.50 h
I'm no longer sure what worried me so much about ConstMatrixView
; I suspect that the new class ConstMatrix
has probably resolved most of the doubts I had.
I do admit that the question in comment 1 (whether matrix
is-a MatrixView
) perturbs me slightly. I suppose one could argue that it is a MatrixView
of whatever internal datastructure is used to hold the values of the entries.
Anyway, the code seems to work fine as it stands. So I'm closing the issue.
(serves me right for not being more precise about whatever worried me)