Gael Guennebaud
2018-05-22 11:57:33 UTC
For the record, this question has been answered on SO:
https://stackoverflow.com/questions/50431053/eigen3-defining-a-variable-size-matrix
gael
https://stackoverflow.com/questions/50431053/eigen3-defining-a-variable-size-matrix
gael
Hi, the problem with your first function is that any parameter passed to
a template has to be a constant or another template parameter, so in
1. Your function has to be a template itself, and
2. either "n" and "p" have to be parameters of the template, or they
have to be deduced from the matrix type (you can only do that with fixed
type matrices).
a template has to be a constant or another template parameter, so in
1. Your function has to be a template itself, and
2. either "n" and "p" have to be parameters of the template, or they
have to be deduced from the matrix type (you can only do that with fixed
type matrices).