Skip to content

more operations for Vectors

Nicolas Marsic requested to merge vectorOperations into master

Hi everyone,

I added the +,-,* and / operators (together with +=,-=,*= and /=) to algebra::Vector.

  • The operations + and - are (obviously) the sum and difference of two vectors
  • The operations * and / are the multiplication/division of a vector by a scalar
  • The operation * can also be a scalar product (when both arguments are vectors).

The current implementation wraps Eigen3 using member pointers, but I'm open to other ideas :).

Note that the scalar product of complex vectors follows the sesquilinearity convention of Eigen3, that is conjugate-linear in the first variable and linear in the second variable (see [1]).

Cheers, Nicolas.

[1] https://eigen.tuxfamily.org/dox/classEigen_1_1MatrixBase.html#adfd32bf5fcf6ee603c924dde9bf7bc39

Merge request reports