The following code is from Libigl's tutorial 306 : http://libigl.github.io/libigl/tutorial/#eigen-decomposition
........
SparseMatrix<double> L,M;
cotmatrix(V,F,L);
L = (-L).eval(); // WHY?????
massmatrix(V,F,MASSMATRIX_TYPE_DEFAULT,M);
const size_t k = 5;
if(!eigs(L,M,k+1,EIGS_TYPE_SM,U,D))
{
cout<<"failed."<<endl;
}
// Normalize
U = ((U.array()-U.minCoeff())/(U.maxCoeff()-U.minCoeff())).eval();
.......
I do not understand L = (-L).eval();
Can anyone help me?
The complete code can be found at https://github.com/libigl/libigl/blob/master/tutorial/306_EigenDecomposition/main.cpp