]> www.ginac.de Git - ginac.git/blobdiff - ginac/ncmul.h
- rotate_31() and golden_hash_ratio() moved to utils.h
[ginac.git] / ginac / ncmul.h
index 5a8b732b3846b3f070a3d19b531a4deaa62fb9c5..03b47ca7ae119c9337a31045f0c509469265ba7b 100644 (file)
@@ -1,7 +1,8 @@
 /** @file ncmul.h
  *
 /** @file ncmul.h
  *
- *  Interface to GiNaC's non-commutative products of expressions.
- *
+ *  Interface to GiNaC's non-commutative products of expressions. */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -24,6 +25,8 @@
 
 #include <ginac/exprseq.h>
 
 
 #include <ginac/exprseq.h>
 
+namespace GiNaC {
+
 /** Non-commutative product of expressions. */
 class ncmul : public exprseq
 {
 /** Non-commutative product of expressions. */
 class ncmul : public exprseq
 {
@@ -105,7 +108,12 @@ extern type_info const & typeid_ncmul;
 ex nonsimplified_ncmul(exvector const & v);
 ex simplified_ncmul(exvector const & v);
 
 ex nonsimplified_ncmul(exvector const & v);
 ex simplified_ncmul(exvector const & v);
 
-#define ex_to_ncmul(X) static_cast<ncmul const &>(*(X).bp)
+// utility functions
+inline const ncmul &ex_to_ncmul(const ex &e)
+{
+       return static_cast <const ncmul &>(*e.bp);
+}
 
 
-#endif // ndef __GINAC_NCMUL_H__
+} // namespace GiNaC
 
 
+#endif // ndef __GINAC_NCMUL_H__