Skip to content

#1020 Add Specialization for DiagonalMatrix<K,1>, that can behave like a scalar

Metadata

Property Value
Reported by Uli Sack (usack@math.fu-berlin.de)
Reported at Jan 17, 2012 10:14
Type Feature Request
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Jö Fahlke (jorrit@jorrit.de)
Last edited at Jan 20, 2012 15:41
Closed by Jö Fahlke (jorrit@jorrit.de)
Closed at Jan 20, 2012 15:41
Closed in version Unknown
Resolution Implemented
Comment

Description

For FieldMatrix<K,1,1> there exists a specialization that allows to use it as a scalar of type K. DiagonalMatrix lacks this specialization and therefore this ability. Find a patch attached that introduces such a specialization.

Note that it inherits from FieldMatrix<K,1,1>. To avoid function calls I acted on _data directly whence I needed to make _data protected instead of private in FieldMatrix<K,1,1>. If that doesn't find the developers taste I can change from this->_data to (*this)[0].

Attachments