]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
- rotate_31() and golden_hash_ratio() moved to utils.h
[ginac.git] / ginac / mul.cpp
index bf5e70dff0d77d4bc5687907cae8974ddee24d87..5054fb06af5871d5e04bd5ab6a61198dda2817b1 100644 (file)
@@ -2,10 +2,33 @@
  *
  *  Implementation of GiNaC's products of expressions. */
 
+/*
+ *  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 <vector>
 #include <stdexcept>
 
-#include "ginac.h"
+#include "mul.h"
+#include "add.h"
+#include "power.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -16,7 +39,7 @@
 mul::mul()
 {
     debugmsg("mul default constructor",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
 }
 
 mul::~mul()
@@ -62,7 +85,7 @@ void mul::destroy(bool call_parent)
 mul::mul(ex const & lh, ex const & rh)
 {
     debugmsg("mul constructor from ex,ex",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     overall_coeff=exONE();
     construct_from_2_ex(lh,rh);
     ASSERT(is_canonical());
@@ -71,7 +94,7 @@ mul::mul(ex const & lh, ex const & rh)
 mul::mul(exvector const & v)
 {
     debugmsg("mul constructor from exvector",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     overall_coeff=exONE();
     construct_from_exvector(v);
     ASSERT(is_canonical());
@@ -81,7 +104,7 @@ mul::mul(exvector const & v)
 mul::mul(epvector const & v, bool do_not_canonicalize)
 {
     debugmsg("mul constructor from epvector,bool",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     if (do_not_canonicalize) {
         seq=v;
 #ifdef EXPAIRSEQ_USE_HASHTAB
@@ -97,7 +120,7 @@ mul::mul(epvector const & v, bool do_not_canonicalize)
 mul::mul(epvector const & v)
 {
     debugmsg("mul constructor from epvector",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     overall_coeff=exONE();
     construct_from_epvector(v);
     ASSERT(is_canonical());
@@ -106,7 +129,7 @@ mul::mul(epvector const & v)
 mul::mul(epvector const & v, ex const & oc)
 {
     debugmsg("mul constructor from epvector,ex",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     overall_coeff=oc;
     construct_from_epvector(v);
     ASSERT(is_canonical());
@@ -115,7 +138,7 @@ mul::mul(epvector const & v, ex const & oc)
 mul::mul(epvector * vp, ex const & oc)
 {
     debugmsg("mul constructor from epvector *,ex",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     ASSERT(vp!=0);
     overall_coeff=oc;
     construct_from_epvector(*vp);
@@ -126,7 +149,7 @@ mul::mul(epvector * vp, ex const & oc)
 mul::mul(ex const & lh, ex const & mh, ex const & rh)
 {
     debugmsg("mul constructor from ex,ex,ex",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
     exvector factors;
     factors.reserve(3);
     factors.push_back(lh);
@@ -991,4 +1014,4 @@ unsigned mul::precedence=50;
 const mul some_mul;
 type_info const & typeid_mul=typeid(some_mul);
 
-
+} // namespace GiNaC