I am using eigen 3.1.0-alpha1 as solver for a my first little software.
I need to return a sparse matrix from a method of a class:
SparseMatrix KMDMatrix::Assembly(double ***p_objs){
SparseMatrix <double> Kglobal(15,15);
for (int i = 0; i < N_POINTS; ++i){
for (int j = 0; j < 10; ++j){
for (int h = 0; h < 10; ++h){
Kglobal.coeffRef(i*5+j,i*5+h)+=p_objs[i][j][h];
}
}
}
return Kglobal;
but it doesn’t work.
One of the errors is:
error C2955: ‘Eigen::SparseMatrix’ : use of class template requires template argument list
I have declared it :
SparseMatrix Assembly(double ***p_objs);
I have some difficulties to use Eigen, the reference is not clear for me.
Thank you for helping me
According to your code you should use
in the return type specifier