Use ReturnByValue to return result of ei_matrix_function(), ...

This commit is contained in:
Jitse Niesen
2010-02-16 16:43:11 +00:00
parent 25019f0836
commit 319bf3130b
6 changed files with 216 additions and 144 deletions

View File

@@ -15,9 +15,8 @@ int main()
A << 0, -pi/4, 0,
pi/4, 0, 0,
0, 0, 0;
std::cout << "The matrix A is:\n" << A << "\n\n";
MatrixXd B;
ei_matrix_function(A, expfn, &B);
std::cout << "The matrix exponential of A is:\n" << B << "\n\n";
std::cout << "The matrix A is:\n" << A << "\n\n";
std::cout << "The matrix exponential of A is:\n"
<< ei_matrix_function(A, expfn) << "\n\n";
}