#includeint main() { Eigen::MatrixXd m(2,2); m(0,0) = 1.0; m(1,0) = 2.0; m(0,1) = 3.0; m(1,1) = 4.0; return 0; }
#includeIn this example, we create a vector of floats using the Eigen::VectorXf type, which is also derived from the PlainObjectBase class. Eigen is a linear algebra package library.int main() { Eigen::VectorXf v(3); v(0) = 1.0; v(1) = 2.0; v(2) = 3.0; return 0; }