* Implementation of GiNaC's symmetry definitions. */
/*
- * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2002 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <iostream>
#include <stdexcept>
#include <functional>
-#include <algorithm>
#include "symmetry.h"
#include "lst.h"
#include "print.h"
#include "archive.h"
#include "utils.h"
-#include "debugmsg.h"
namespace GiNaC {
*/
//////////
-// default constructor, destructor, copy constructor assignment operator and helpers
+// default ctor, dtor, copy ctor, assignment operator and helpers
//////////
symmetry::symmetry() : type(none)
{
- debugmsg("symmetry default constructor", LOGLEVEL_CONSTRUCT);
tinfo_key = TINFO_symmetry;
}
symmetry::symmetry(unsigned i) : type(none)
{
- debugmsg("symmetry constructor from unsigned", LOGLEVEL_CONSTRUCT);
indices.insert(i);
tinfo_key = TINFO_symmetry;
}
symmetry::symmetry(symmetry_type t, const symmetry &c1, const symmetry &c2) : type(t)
{
- debugmsg("symmetry constructor from symmetry_type,symmetry &,symmetry &", LOGLEVEL_CONSTRUCT);
add(c1); add(c2);
tinfo_key = TINFO_symmetry;
}
/** Construct object from archive_node. */
symmetry::symmetry(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
- debugmsg("symmetry ctor from archive_node", LOGLEVEL_CONSTRUCT);
-
unsigned t;
if (!(n.find_unsigned("type", t)))
throw (std::runtime_error("unknown symmetry type in archive"));
void symmetry::print(const print_context & c, unsigned level) const
{
- debugmsg("symmetry print", LOGLEVEL_PRINT);
-
if (is_a<print_tree>(c)) {
c.s << std::string(level, ' ') << class_name()