]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.h
#ifndef around namespace GiNaC { }
[ginac.git] / ginac / matrix.h
index 141437bfa06f93fc4bb8988e7205555c4b8cc5a5..4ad11ea8108592b3a72fee3df5bbabcd670ee71c 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
 #define __GINAC_MATRIX_H__
 
 #include <vector>
+#include <ginac/basic.h>
+#include <ginac/ex.h>
+
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Symbolic matrices. */
 class matrix : public basic
@@ -141,8 +148,14 @@ 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))
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_MATRIX_H__