You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
529 B

  1. #include <iostream>
  2. #include <Eigen/Dense>
  3. using namespace std;
  4. int main()
  5. {
  6. Eigen::Matrix2d mat;
  7. mat << 1, 2,
  8. 3, 4;
  9. cout << "Here is mat.sum(): " << mat.sum() << endl;
  10. cout << "Here is mat.prod(): " << mat.prod() << endl;
  11. cout << "Here is mat.mean(): " << mat.mean() << endl;
  12. cout << "Here is mat.minCoeff(): " << mat.minCoeff() << endl;
  13. cout << "Here is mat.maxCoeff(): " << mat.maxCoeff() << endl;
  14. cout << "Here is mat.trace(): " << mat.trace() << endl;
  15. }