ARTICLE AD BOX
I'm trying to use Eigen matrix lib for batch ops but cannot make it working, because seems cannot mix Matrices and Vectors in batch.
This example doesn't compile... compiler throws error: YOU_CANNOT_MIX_ARRAYS_AND_MATRICES
Eigen::MatrixX3f ref_landmarks(landmarks_size, 3); Eigen::Vector3f ref_offset = offset * fScale; Eigen::MatrixX3f ref_landmarks_offset = ref_landmarks.array().rowwise() - ref_offset;Here i'm trying to offset matrix by constant vector. Can be rewritten:
for (int i = 0; i < landmarks_size; i++) { ref_landmarks(i, 0) -= ref_offset.x(); ref_landmarks(i, 1) -= ref_offset.y(); ref_landmarks(i, 2) -= ref_offset.z(); }But in this case i don't see the point to use Eigen.
Question is how to mix Vector and matrix ops in Eigen and also is there way to make in-place op without creating additional ref_landmarks_offset matrix ?
Any help will be appreciated!
