Registered Member
|
Hi folks,
I am using Eigen for a numerical solver and I have a peculiar problem: I want to create a matrix, which does not actually store the elements but computes them when accessed (I do not want to store it, because it should actually represent a slice of a 3d matrix and that's too large to fit into memory; it is also unfortunately not sparse). Basically I want to create something with a simple getter:
Is there an easy way how to achieve that in Eigen? Thanks in advance for any suggestions |
Moderator
|
yes, you can use MatrixXd::NullaryExpr(my_functor), there is an example there: http://eigen.tuxfamily.org/dox-devel/cl ... f78b068a9b
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]