Skip to content

Implement ScalarMatrixView

Carsten Gräser requested to merge feature/implement-scalarmatrixview into master

This wrapper around a pointer to a number makes the number look like a 1x1 matrix. The asMatrix() helper functions get a matrix-like object form either a matrix or a number:

  • If the object is a number, it's wrapped into the ScalarMatrixView proxy matrix.
  • Otherwise it is asumed that the object already is a matrix which is simply forwarded.

In order to use this you have to use proxy-aware universal references

auto&& matrix = Impl::asMatrix(matrixOrNumber);

All functionality (despite traits class spezializations) are contained in the namespace Impl::

Edited by Carsten Gräser

Merge request reports