Project

General

Profile

Design #592

Review design of ConstMatrixView

Added by John Abbott almost 10 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Tidying
Start date:
17 Jul 2014
Due date:
% Done:

100%

Estimated time:
1.50 h
Spent time:

Description

After having trouble trying to implement MatXel as a ConstMatrixView, I think the design of ConstMatrixView needs to be reconsidered.


Related issues

Related to CoCoALib - Design #311: XelMat, StdDegRevLexMat, ... should be MatrixViewClosed2013-02-14

Related to CoCoALib - Bug #350: problem with "matrix" argument in functionsClosed2013-05-21

Related to CoCoALib - Bug #804: ZeroMat and IdentityMat should produce a matrix not a ConstMatrixViewClosed2015-11-12

Related to CoCoALib - Design #805: New type for "constant" matrices?Closed2015-11-13

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)

Also available in: Atom PDF