/** @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
#include <ginac/exprseq.h>
+#ifndef NO_GINAC_NAMESPACE
+namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
+
/** Non-commutative product of expressions. */
class ncmul : public exprseq
{
// functions overriding virtual functions from bases classes
public:
basic * duplicate() const;
- void printraw(ostream & os) const;
void print(ostream & os, unsigned upper_precedence) const;
+ void printraw(ostream & os) const;
void printcsrc(ostream & os, unsigned upper_precedence) const;
bool info(unsigned inf) const;
int degree(symbol const & s) const;
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);
+}
+
+#ifndef NO_GINAC_NAMESPACE
+} // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
#endif // ndef __GINAC_NCMUL_H__
-