]> www.ginac.de Git - ginac.git/blobdiff - ginac/idx.cpp
- put everything in "GiNaC" namespace
[ginac.git] / ginac / idx.cpp
index 9829b876b025b8c5c2f850b698e789ac9d23f16f..26e91ff87f7444bfb40d6d3300389d6fc8214034 100644 (file)
@@ -2,10 +2,34 @@
  *
  *  Implementation of GiNaC's indices. */
 
+/*
+ *  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 "idx.h"
+#include "ex.h"
+#include "lst.h"
+#include "relational.h"
 #include "utils.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
 
 //////////
 // default constructor, destructor, copy constructor assignment operator and helpers
@@ -13,7 +37,7 @@
 
 // public
 
-idx::idx() : basic(TINFO_IDX), symbolic(true), covariant(false)
+idx::idx() : basic(TINFO_idx), symbolic(true), covariant(false)
 {
     debugmsg("idx default constructor",LOGLEVEL_CONSTRUCT);
     serial=next_serial++;
@@ -65,28 +89,28 @@ void idx::destroy(bool call_parent)
 
 // public
 
-idx::idx(bool cov) : basic(TINFO_IDX), symbolic(true), covariant(cov)
+idx::idx(bool cov) : basic(TINFO_idx), symbolic(true), covariant(cov)
 {
     debugmsg("idx constructor from bool",LOGLEVEL_CONSTRUCT);
     serial=next_serial++;
     name="index"+ToString(serial);
 }
 
-idx::idx(string const & n, bool cov) : basic(TINFO_IDX),  
+idx::idx(string const & n, bool cov) : basic(TINFO_idx),  
     symbolic(true), name(n), covariant(cov)
 {
     debugmsg("idx constructor from string,bool",LOGLEVEL_CONSTRUCT);
     serial=next_serial++;
 }
 
-idx::idx(char const * n, bool cov) : basic(TINFO_IDX),  
+idx::idx(char const * n, bool cov) : basic(TINFO_idx),  
     symbolic(true), name(n), covariant(cov)
 {
     debugmsg("idx constructor from char*,bool",LOGLEVEL_CONSTRUCT);
     serial=next_serial++;
 }
 
-idx::idx(unsigned const v, bool cov) : basic(TINFO_IDX),
+idx::idx(unsigned const v, bool cov) : basic(TINFO_idx),
     symbolic(false), value(v), covariant(cov)
 {
     debugmsg("idx constructor from unsigned,bool",LOGLEVEL_CONSTRUCT);
@@ -422,6 +446,4 @@ ex subs_indices(ex const & e, exvector const & idxv_subs,
     return res;
 }
 
-
-
-
+} // namespace GiNaC