X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fidx.cpp;h=26e91ff87f7444bfb40d6d3300389d6fc8214034;hp=9829b876b025b8c5c2f850b698e789ac9d23f16f;hb=3ecae1b0cd75b32bec423fa8cca5626f7790ab42;hpb=6b3768e8c544739ae53321539cb4d1e3112ded1b diff --git a/ginac/idx.cpp b/ginac/idx.cpp index 9829b876..26e91ff8 100644 --- a/ginac/idx.cpp +++ b/ginac/idx.cpp @@ -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 -#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