I want to know if getting the scalar type from the array type by ArrayType::Scalar is documented for the Eigen library.
The following compiles (g++ test.cpp -I<Path to Eigen> -frtti)
#include <Eigen/Eigen>
#include <typeinfo>
#include <iostream>
int main() {
Eigen::ArrayXf::Scalar i = 0;
std::cout << typeid(i).name() << "\n";
}
Result (float type as expected):
f
That also works for MatrixXf type.