]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
- put everything in "GiNaC" namespace
[ginac.git] / ginac / mul.cpp
index ef0af1b732cb785f3292acf2fb112201a076d28a..5054fb06af5871d5e04bd5ab6a61198dda2817b1 100644 (file)
@@ -1,7 +1,8 @@
 /** @file mul.cpp
  *
- *  Implementation of GiNaC's products of expressions.
- *
+ *  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
 #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
@@ -33,7 +39,7 @@
 mul::mul()
 {
     debugmsg("mul default constructor",LOGLEVEL_CONSTRUCT);
-    tinfo_key = TINFO_MUL;
+    tinfo_key = TINFO_mul;
 }
 
 mul::~mul()
@@ -79,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());
@@ -88,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());
@@ -98,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
@@ -114,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());
@@ -123,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());
@@ -132,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);
@@ -143,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);
@@ -1008,4 +1014,4 @@ unsigned mul::precedence=50;
 const mul some_mul;
 type_info const & typeid_mul=typeid(some_mul);
 
-
+} // namespace GiNaC