Wrong result of expression using selfadjointView on 1D matrix
https://godbolt.org/z/q6vrr57qM
template<int N>
using MatrixNf = Eigen::Matrix<float, N, N>;
int main() {
const MatrixNf<1> m = MatrixNf<1>::Constant(2);
const Eigen::Vector3f v = Eigen::Vector3f::Constant(3);
const MatrixNf<1> m_selfadjoint = m.selfadjointView<Eigen::Lower>();
// Expected these outputs to be equal
std::cout << v * m_selfadjoint * v.transpose() << "\n\n";
std::cout << v * m.selfadjointView<Eigen::Lower>() * v.transpose() << "\n\n";
}
Output:
18 18 18
18 18 18
18 18 18
18 18 18
0 0 0
0 0 0
Edited by Fredrik Bjerkås