Registered Member
|
Hi,
I created a plugin file included through EIGEN_MATRIXBASE_PLUGIN. I have been able to implement everything I need so far, except for the log and exp functions. My first naive implementation was to add this to EIGEN_MATRIXBASE_PLUGIN:
However, this trigger the following compilation error:
Which comes from the log() declaration further down MatrixBase.h:
Since this class is declared but not defined, I also get the error:
Since the definition is in the "unsupported section" of the code, what are my best options ? I could edit MatrixBase.h to remove the log() declaration, and use my log member function which returns a CwiseUnaryOp. The problem is doing so will alter Eigen, something I am not sure will be an option when deploying my code (neither am I sure that embedding a modified version of Eigen will be). Or should I include the definition from the unsupported section in my EIGEN_MATRIXBASE_PLUGIN ? Are there other options ? Regards, VK |
Moderator
|
Indeed, there is conflict with the matrix logarithm and coefficient-wise logarithm. A workaround would be to define the class MatrixLogarithmReturnValue yourself: it only has to inherit CwiseUnaryOp<internal::scalar_log_op<typename Derived::Scalar>, const Derived>, and implement the respective constructor.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]