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

@@ -7,12 +7,10 @@ int main()
MatrixXd A = MatrixXd::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXd sinA;
ei_matrix_sin(A, &sinA);
MatrixXd sinA = ei_matrix_sin(A);
std::cout << "sin(A) = \n" << sinA << "\n\n";
MatrixXd cosA;
ei_matrix_cos(A, &cosA);
MatrixXd cosA = ei_matrix_cos(A);
std::cout << "cos(A) = \n" << cosA << "\n\n";
// The matrix functions satisfy sin^2(A) + cos^2(A) = I,