Project

General

Profile

Feature #1788

New MatrixView/function "FirstRows/FirstCols"?

Added by Anna Maria Bigatti about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
New Function
Target version:
Start date:
08 Mar 2024
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:

Description

I went through all the calls of submat in CoCoALib (not so many) and indeed most of them just select the first rows.

Should we have another MatrixView class called FirstRows(M, long r)?
Or, much easier to implement, a function called FirstRows(M, long r)?
(same for cols)

The implementation of a new MatrixView could be quite a bit simpler than the implementation of submat, but problably not worth the effort and "duplication" of code.

2024-03 implemented as functions calling submat


Related issues

Related to CoCoALib - Design #64: submat takes only vector<long>Closed2011-12-15

Related to CoCoALib - Feature #312: LongRange(a,b) returning vector of long a..b (included)Closed2013-02-14

Related to CoCoALib - Feature #202: MatrixView/function for viewing a single row or column (RowMat, ColMat)Closed2012-07-04

History

#1 Updated by Anna Maria Bigatti about 2 months ago

  • Related to Design #64: submat takes only vector<long> added

#2 Updated by Anna Maria Bigatti about 2 months ago

  • Related to Feature #312: LongRange(a,b) returning vector of long a..b (included) added

#3 Updated by Anna Maria Bigatti about 2 months ago

  • Related to Feature #202: MatrixView/function for viewing a single row or column (RowMat, ColMat) added

#4 Updated by Anna Maria Bigatti about 2 months ago

  • Subject changed from New MatrixView "FirstRowsCols"? to New MatrixView/function "FirstRows/FirstCols"?
  • Description updated (diff)
  • Assignee set to Anna Maria Bigatti
  • % Done changed from 0 to 20

#5 Updated by Anna Maria Bigatti about 2 months ago

After personal discussion, we agreed on new function (until we believe a new class would be considerably better)

#6 Updated by Anna Maria Bigatti about 2 months ago

  • Category changed from Data Structures to New Function

#7 Updated by Anna Maria Bigatti about 1 month ago

  • Status changed from New to Feedback
  • Target version changed from CoCoALib-0.99880 to CoCoALib-0.99850
  • % Done changed from 20 to 90

I liked this too much and I did it.
Called in some lib/5 tests, called by GradingMat.
Easy enough. should not need more testing than this.

Missing only documentation.

#8 Updated by Anna Maria Bigatti about 1 month ago

  • Description updated (diff)

#9 Updated by Anna Maria Bigatti about 1 month ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

Added documentation for CoCoALib/5.

Also available in: Atom PDF