Feature #1436
Flatten for a matrix
Description
I happened to see in SparsePolyOps-MinPoly.C
that there is a function for "flattening" a matrix.
Do we want to make official functions for flattening?
Suggested names: FlattenMatByRows
and FlattenMatByCols
Return type: vector<RingElem>
Note that we already have MatByRows
and MatByCols
which are the opposite functions.
History
#1 Updated by John Abbott over 3 years ago
- Priority changed from Normal to Low
- Target version changed from CoCoALib-0.99800 to CoCoALib-0.99850
- (A) there are already the functions
GetRows
andGetCols
which return avector<vector<RingElem>>
- (B) the current fn is
MatrixFlatten
around lines 116-125 inSparsePolyOps-MinPoly.C
In its current "private" form MatrixFlatten
is a "nasty" impl: it requires that the vector into which the result is copied be of the right size.
We could either use resize
inside the function, or else write a function which creates a new vector and returns that (returning should not copy the vector).
I think this is not urgent, so am postponing to 0.99750.
#2 Updated by Anna Maria Bigatti over 3 years ago
it is only used in RingElem MinPoly(ConstMatrixView M, ConstRefRingElem x).
#3 Updated by John Abbott over 3 years ago
- Status changed from New to Resolved
- Assignee set to John Abbott
- % Done changed from 0 to 50
I have written a first impl (in MatrixOps-flatten.C
).
Added doc.
No tests yet.
#4 Updated by John Abbott over 3 years ago
- % Done changed from 50 to 60
I have checked in the code.
The fn names are FlattenByRows
and FlattenByCols
; it seems unnecessary to have Mat
in the fn names!
#5 Updated by John Abbott over 3 years ago
- Target version changed from CoCoALib-0.99850 to CoCoALib-0.99800
#6 Updated by John Abbott over 3 years ago
- Status changed from Resolved to Feedback
- % Done changed from 60 to 90
I have added a test to test-matrix4.C
#7 Updated by John Abbott over 3 years ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time set to 1.41 h