Skip to content

Add various binary operators to DenseVector and DenseMatrix

Oliver Sander requested to merge binary-operators into master

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 or DenseMatrix 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?

Merge request reports

Loading