]> www.ginac.de Git - ginac.git/blobdiff - ginac/ncmul.cpp
- revamped indexed objects
[ginac.git] / ginac / ncmul.cpp
index d8e7584bc723e248702a2336255d88a7393ecc5c..1433a3a883132a36a3c3e744a0bafa9ba7ce1fa7 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's non-commutative products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2001 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
@@ -32,9 +32,7 @@
 #include "debugmsg.h"
 #include "utils.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
 
 GINAC_IMPLEMENT_REGISTERED_CLASS(ncmul, exprseq)
 
@@ -50,28 +48,6 @@ ncmul::ncmul()
        tinfo_key = TINFO_ncmul;
 }
 
-ncmul::~ncmul()
-{
-       debugmsg("ncmul destructor",LOGLEVEL_DESTRUCT);
-       destroy(false);
-}
-
-ncmul::ncmul(const ncmul & other)
-{
-       debugmsg("ncmul copy constructor",LOGLEVEL_CONSTRUCT);
-       copy(other);
-}
-
-const ncmul & ncmul::operator=(const ncmul & other)
-{
-       debugmsg("ncmul operator=",LOGLEVEL_ASSIGNMENT);
-       if (this != &other) {
-               destroy(true);
-               copy(other);
-       }
-       return *this;
-}
-
 // protected
 
 void ncmul::copy(const ncmul & other)
@@ -164,12 +140,6 @@ void ncmul::archive(archive_node &n) const
 
 // public
 
-basic * ncmul::duplicate() const
-{
-       debugmsg("ncmul duplicate",LOGLEVEL_ASSIGNMENT);
-       return new ncmul(*this);
-}
-
 void ncmul::print(std::ostream & os, unsigned upper_precedence) const
 {
        debugmsg("ncmul print",LOGLEVEL_PRINT);
@@ -501,20 +471,6 @@ ex ncmul::eval(int level) const
                                                                                  status_flags::evaluated);
 }
 
-exvector ncmul::get_indices(void) const
-{
-       // return union of indices of factors
-       exvector iv;
-       for (exvector::const_iterator cit=seq.begin(); cit!=seq.end(); ++cit) {
-               exvector subiv=(*cit).get_indices();
-               iv.reserve(iv.size()+subiv.size());
-               for (exvector::const_iterator cit2=subiv.begin(); cit2!=subiv.end(); ++cit2) {
-                       iv.push_back(*cit2);
-               }
-       }
-       return iv;
-}
-
 ex ncmul::subs(const lst & ls, const lst & lr) const
 {
        return ncmul(subschildren(ls, lr));
@@ -624,15 +580,7 @@ const exvector & ncmul::get_factors(void) const
 
 // protected
 
-unsigned ncmul::precedence=50;
-
-
-//////////
-// global constants
-//////////
-
-const ncmul some_ncmul;
-const type_info & typeid_ncmul=typeid(some_ncmul);
+unsigned ncmul::precedence = 50;
 
 //////////
 // friend functions
@@ -654,6 +602,4 @@ ex simplified_ncmul(const exvector & v)
                                       status_flags::evaluated);
 }
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC