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.

22 lines
454 B

  1. #include <StormEigen/Dense>
  2. #include <iostream>
  3. using namespace StormEigen;
  4. using namespace std;
  5. int main()
  6. {
  7. MatrixXf m(2,2);
  8. MatrixXf n(2,2);
  9. MatrixXf result(2,2);
  10. m << 1,2,
  11. 3,4;
  12. n << 5,6,
  13. 7,8;
  14. result = (m.array() + 4).matrix() * m;
  15. cout << "-- Combination 1: --" << endl << result << endl << endl;
  16. result = (m.array() * n.array()).matrix() * m;
  17. cout << "-- Combination 2: --" << endl << result << endl << endl;
  18. }