Registered Member
|
I want to write a template function that only works for matrix with float(float/double in C++) type. How do I get the coefficient type of a matrix and check if it is an integer type or float type?
|
Registered Member
|
you can use
is_same is a generic struct defined in Eigen as :
|
Moderator
|
You can also look at NumTraits<typename MatrixType::Scalar>::IsInteger, ::IsComplex,, etc.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]