]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
- ASSERT macro renamed to GINAC_ASSERT
[ginac.git] / ginac / matrix.h
index f30a39a264bbd7977698fc66b2df701a07d0a383..769647cacdeede3685ec276e804e774c814783b0 100644 (file)
@@ -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 <ginac/basic.h>
 #include <ginac/ex.h>
 
+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<const matrix &>(*e.bp);
+}
 
-#define ex_to_matrix(X) (static_cast<matrix const &>(*(X).bp))
+} // namespace GiNaC
 
 #endif // ndef __GINAC_MATRIX_H__