]> www.ginac.de Git - ginac.git/blobdiff - ginac/color.cpp
- modified the comment blocks so the copyright message no longer appears in
[ginac.git] / ginac / color.cpp
index f790e94163d0542190329e6c78d166208ad7baea..33dc647cfbe3bba70a7984372c1d41546a34f533 100644 (file)
@@ -3,13 +3,36 @@
  *  Implementation of GiNaC's color objects.
  *  No real implementation yet, to be done.     */
 
+/*
+ *  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 <string>
 #include <list>
 #include <algorithm>
 #include <iostream>
 #include <stdexcept>
 
-#include "ginac.h"
+#include "color.h"
+#include "ex.h"
+#include "coloridx.h"
+#include "ncmul.h"
+#include "numeric.h"
+#include "relational.h"
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -20,7 +43,7 @@
 color::color() : type(invalid), representation_label(0)
 {
     debugmsg("color default constructor",LOGLEVEL_CONSTRUCT);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
 }
 
 color::~color()
@@ -71,7 +94,7 @@ color::color(color_types const t, unsigned const rl) : type(t), representation_l
 {
     debugmsg("color constructor from color_types,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -80,7 +103,7 @@ color::color(color_types const t, ex const & i1, unsigned const rl)
 {
     debugmsg("color constructor from color_types,ex,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -89,7 +112,7 @@ color::color(color_types const t, ex const & i1, ex const & i2, unsigned const r
 {
     debugmsg("color constructor from color_types,ex,ex,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -98,7 +121,7 @@ color::color(color_types const t, ex const & i1, ex const & i2, ex const & i3,
 {
     debugmsg("color constructor from color_types,ex,ex,ex,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -107,7 +130,7 @@ color::color(color_types const t, exvector const & iv, unsigned const rl)
 {
     debugmsg("color constructor from color_types,exvector,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -116,7 +139,7 @@ color::color(color_types const t, exvector * ivp, unsigned const rl)
 {
     debugmsg("color constructor from color_types,exvector *,unsigned",LOGLEVEL_CONSTRUCT);
     ASSERT(representation_label<MAX_REPRESENTATION_LABELS);
-    tinfo_key=TINFO_COLOR;
+    tinfo_key=TINFO_color;
     ASSERT(all_of_type_coloridx());
 }
 
@@ -321,7 +344,7 @@ ex color::eval(int level) const
 
 int color::compare_same_type(basic const & other) const
 {
-    ASSERT(other.tinfo() == TINFO_COLOR);
+    ASSERT(other.tinfo() == TINFO_color);
     const color *o = static_cast<const color *>(&other);
     if (type==o->type) {
         if (representation_label==o->representation_label) {
@@ -334,7 +357,7 @@ int color::compare_same_type(basic const & other) const
 
 bool color::is_equal_same_type(basic const & other) const
 {
-    ASSERT(other.tinfo() == TINFO_COLOR);
+    ASSERT(other.tinfo() == TINFO_color);
     const color *o = static_cast<const color *>(&other);
     if (type!=o->type) return false;
     if (representation_label!=o->representation_label) return false;