*
* 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
// 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++;
// 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);
return res;
}
-
-
-
+} // namespace GiNaC