Add various binary operators to DenseVector and DenseMatrix
This MR implements various two-argument operators for DenseVector
and DenseMatrix
objects. It works in principle, but has two short-comings:
- Type promotion does not work properly. Fixing this requires being able to rebind a given
DenseVector
orDenseMatrix
to a new number type. This is not currently possible. - Matrix multiplication does not work unless the factors are square. The reason for this is similar: The implementation needs to construct a result matrix of a new size, and this is not currently supported within
DenseMatrix
.
One possible short-term fix for both problems would be to add the implementations to FieldVector
and FieldMatrix
only, not their Dense
base classes.
Opinions?