]> www.ginac.de Git - ginac.git/blobdiff - ginac/diff.cpp
- building GiNaC will no longer bomb if Doxygen is not present
[ginac.git] / ginac / diff.cpp
index b8ef4c5c71e8bd0120aa902645d9b5d20d728ecb..7b4d489b76b6dc1a51e572c9326657282411f5d7 100644 (file)
@@ -2,9 +2,42 @@
  *
  *  Implementation of symbolic differentiation in all of GiNaC's classes. */
 
+/*
+ *  GiNaC Copyright (C) 1999 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
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
 #include <stdexcept>
 
-#include "ginac.h"
+#include "basic.h"
+#include "ex.h"
+#include "add.h"
+#include "constant.h"
+#include "expairseq.h"
+#include "indexed.h"
+#include "inifcns.h"
+#include "mul.h"
+#include "ncmul.h"
+#include "numeric.h"
+#include "power.h"
+#include "relational.h"
+#include "series.h"
+#include "symbol.h"
+
+namespace GiNaC {
 
 /** Default implementation of ex::diff(). It prints and error message and returns a fail object.
  *  @see ex::diff */
@@ -167,7 +200,7 @@ ex series::diff(symbol const & s) const
         epvector new_seq;
         epvector::const_iterator it = seq.begin(), itend = seq.end();
         
-        //!! coeff might depend on var
+        // FIXME: coeff might depend on var
         while (it != itend) {
             if (is_order_function(it->rest)) {
                 new_seq.push_back(expair(it->rest, it->coeff - 1));
@@ -193,7 +226,7 @@ ex series::diff(symbol const & s) const
 
 ex ex::diff(symbol const & s, unsigned nth) const
 {
-    ASSERT(bp!=0);
+    GINAC_ASSERT(bp!=0);
 
     if ( nth==0 ) {
         return *this;
@@ -206,3 +239,5 @@ ex ex::diff(symbol const & s, unsigned nth) const
     }
     return ndiff;
 }
+
+} // namespace GiNaC