Registered Member
|
If I have a function defined as
and I call it like so:
how can I, inside the `foo()` function, obtain the underlying scalar type of the `mat` input argument, namely, `uint16_t`? Is there a typedef that I can invoke on `Derived` to get at that underlying type? (I need this in order to read from disk: I'll wind up calling `sizeof()` on this type, i.e., `uint16_t`. I'd rather not template `foo` using this scalar type because I'd like the function to be as general as possible, working with static and dynamic Eigen matrixes. This is based on the examples at http://eigen.tuxfamily.org/dox/TopicFun ... Types.html) |
Registered Member
|
I noticed the `Scalar` typedef while reading http://eigen.tuxfamily.org/dox/MatrixBa ... ource.html (source, I couldn't seem to find a reference to this typedef in the regular docs?) and it works a treat. Inside `foo()`, I can do:
and work with `Scalar` (for reading bytes from disk, e.g.). |
Moderator
|
Indeed, we have a lot of issues with doxygen not being able to properly understand Eigen's code. Regarding this specific issue, I filled a bug entry: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=728
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]