]> www.ginac.de Git - ginac.git/blobdiff - ginac/symbol.h
- changed old-style power() to new-style pow()
[ginac.git] / ginac / symbol.h
index 9905f3c861efe501dd2a365ed795f98bbf36427a..d633a473c3812965bc08cb6f2909d3792085b0a0 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's symbolic objects. */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -27,7 +27,9 @@
 #include <ginac/basic.h>
 #include <ginac/ex.h>
 
+#ifndef NO_GINAC_NAMESPACE
 namespace GiNaC {
+#endif // ndef NO_GINAC_NAMESPACE
 
 /** Basic CAS symbol.  It has a name because it must know how to output itself.
  *  It may be assigned an expression, but this feature is only intended for
@@ -37,7 +39,10 @@ namespace GiNaC {
  *  first place. */
 class symbol : public basic
 {
+    GINAC_DECLARE_REGISTERED_CLASS(symbol, basic)
+
 // types
+
     /** Symbols as keys to expressions. */
     class assigned_ex_info {
     public:
@@ -65,9 +70,9 @@ public:
     // functions overriding virtual functions from base classes
 public:
     basic * duplicate() const;
+    void print(ostream & os, unsigned upper_precedence=0) const;
     void printraw(ostream & os) const;
     void printtree(ostream & os, unsigned indent) const;
-    void print(ostream & os, unsigned upper_precedence=0) const;
     void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
     bool info(unsigned inf) const;
     ex expand(unsigned options=0) const;
@@ -77,6 +82,7 @@ public:
     ex coeff(symbol const & s, int const n = 1) const;
     ex eval(int level = 0) const;
     ex diff(symbol const & s) const;
+    ex series(symbol const & s, ex const & point, int order) const;
     ex normal(lst &sym_lst, lst &repl_lst, int level=0) const;
     ex subs(lst const & ls, lst const & lr) const;
 protected:
@@ -127,6 +133,8 @@ inline int degree(symbol const & a, symbol const & s)
 inline int ldegree(symbol const & a, symbol const & s)
 { return a.ldegree(s); }
 
+#ifndef NO_GINAC_NAMESPACE
 } // namespace GiNaC
+#endif // ndef NO_GINAC_NAMESPACE
 
 #endif // ndef __GINAC_SYMBOL_H__