smoke_test.cpp 455 B

12345678910111213141516171819202122232425262728
  1. #include <iostream>
  2. #include <armadillo>
  3. #include <stdio.h>
  4. using namespace arma;
  5. int
  6. main1()
  7. {
  8. std::cout << "*** smoke test start" << std::endl;
  9. uword N = 5;
  10. mat A = reshape(regspace(1, N*N), N, N);
  11. A.diag() += randu<vec>(N);
  12. mat B;
  13. bool status = expmat(B,A);
  14. A.print("A:");
  15. B.print("B:");
  16. std::cout << ((status) ? "*** smoke test okay" : "*** smoke test failed") << std::endl;
  17. return (status) ? 0 : -1;
  18. }