1

In matlab, we can use a vector B to get the sublist of vector A by coding like A(B). But in Eigen, I am wondering if there is anyway to do that?

Y. Wang
  • 11
  • 1

1 Answers1

0

With the current development branch (since mid-2018) and starting with the 3.4 releases (which will likely be released start of 2019) you can simply write A(B), if B is either an Eigen object or a std::vector with integer coefficients.

See new features of the 3.4 release page for details.

chtz
  • 17,329
  • 4
  • 26
  • 56