X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fmatrix.h;h=769647cacdeede3685ec276e804e774c814783b0;hp=235fbda4905fdcb0f387a061d3b41ee07d6eb8fc;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c diff --git a/ginac/matrix.h b/ginac/matrix.h index 235fbda4..769647ca 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -27,6 +27,8 @@ #include #include +namespace GiNaC { + /** Symbolic matrices. */ class matrix : public basic { @@ -144,8 +146,12 @@ inline ex charpoly(matrix const & m, ex const & lambda) inline matrix inverse(matrix const & m) { return m.inverse(); } -// macros +// utility functions +inline const matrix &ex_to_matrix(const ex &e) +{ + return static_cast(*e.bp); +} -#define ex_to_matrix(X) (static_cast(*(X).bp)) +} // namespace GiNaC #endif // ndef __GINAC_MATRIX_H__