My understanding of a symmetric matrix is that A(i,j) == A(j,i), but in Eigen only one of these is defined. What am I missing?
Here is an example below. I've also tried variations of that and don't seem to see an answer elsewhere. Am I supposed to manually ensure that the indices comply to some internal expectations?
MatrixXf m(4, 4); // uninitialized 4x4
auto v = m.selfadjointView<Upper>(); // I don't need triangular matrix, but ok by me to store it only once
int i = 1;
int j = 3;
v(i, j) = 3.0f; // either v(i,j) or v(j,i) is undefined. How can I permit both?
std::cout << "\n"
<< v(j, i);