X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fmatrix.h;h=769647cacdeede3685ec276e804e774c814783b0;hp=f30a39a264bbd7977698fc66b2df701a07d0a383;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=66c0f31c678e6c1938d637636b230ea376c157c1 diff --git a/ginac/matrix.h b/ginac/matrix.h index f30a39a2..769647ca 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -1,7 +1,8 @@ /** @file matrix.h * - * Interface to symbolic matrices - * + * Interface to symbolic matrices */ + +/* * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify @@ -26,6 +27,8 @@ #include #include +namespace GiNaC { + /** Symbolic matrices. */ class matrix : public basic { @@ -143,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__