linbox
linbox copied to clipboard
Blackbox Transpose is not a blackbox
It offers setEntry
and getEntry
methods, calling the setEntry
and getEntry
of the template argument (supposed to be a blackbox).
Hence it can not be used to build a transpose matrix of a blackbox. It is however used with sparse matrices. Note that there is already a dedicated blackbox-style transpose class for BlasMatrix: TransposeBlasMatrix
which assumes to be constructed on top of another BlasMatrix or TransposeBlasMatrix.
Suggestion:
- blackbox/transpose.h is only used for blackboxes (only offers apply)
- matrix/densematrix/transpose.h is the current TransposeBlasMatrix class dealing with blasmatrices
- matrix/sparsematrix/transpose.h is a transpose class with
getEntry
andsetEntry
.
Or alternatively, let's have just one class for all 3 cases: the methods specific to one type (getEntry, setEntry for SparseMatrix and BlasMatrix, getPointer, getStride for BlasMatrix) are defined, but will not be compiled when the Transpose of a blackbox matrix is made, since they will not be called.