![]() Registered Member ![]()
|
I have a certain structure which can be viewed as a finite field defined as a class in C++ with multiplicative and additive operations (well) defined through overloading of standard c++ operators. I am interested in whether I can use it as a custom scalar class for dense Eigen matrices. I have already tried it and it works for simple operations like matrix addition, multiplication, multiplication by scalar and determinant.
However, I would like to know what can go wrong if someone tries to use other methods of matrix class. Generally, I am interested to know what operators need to be defined for the custom scalar class to allow all methods of the dense Matrix class to work. Is overloading +,-(x2),*,/,+=,-=,*=,/=,++,--,= going to be enough?
I tried Eigen documentation, but I do not think it has been written for this feature yet. Here's the link about custom scalars in Eigen documentation: http://eigen.tuxfamily.org/dox/TopicScalarTypes.html Thank you for your help in advance. |
![]() Moderator ![]()
|
++ and -- are not used by Eigen. On the other hand you might also need standard functions as: min, max, abs, <, >.
|
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]