Registered Member
|
Hi, is it possible to use Eigen with static dimensional analysis libraries such as boost::units? As you've probably already imagined at this point, the problem is that the following should hold for such a use case:
Obviously, assuming that distance*force returns energy in the library. Is it possible to modify Eigen to provide this functionality? To my understanding, operations between matrices of different scalar types are deliberately avoided, so, are there any back doors? If not, is this a planned feature? I think this feature will be requested more and more often as the user defined literals of C++11 gets more support from compilers. I believe, people will suddenly be crazy about dimensional analysis. Nowadays, when I define a function like
I feel as insecure as using void pointers!!! Thanks! |
Moderator
|
With the devel branch, you might try to define:
of course this is limited to products, scalar*matrix is not supported (you can workaround using Constant and a cwiseProduct), and this rely on internal API that is subject to change and improve to finally propose a stable public API for that use cases. |
Registered Member
|
Thanks a lot, I'm glad to learn that this is a planned feature, it makes Eigen more valuable. Thanks for Eigen overall!!!
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]