]> www.ginac.de Git - ginac.git/blobdiff - ginac/simp_lor.h
* New funny timing added: compute an antipode in Yukawa theory.
[ginac.git] / ginac / simp_lor.h
index 4f5c49f555d84b458a1dcae2c383cb02d0de6ca0..1fcf84fc316fb0ba511be8816eb19e801b29a1f2 100644 (file)
@@ -3,7 +3,7 @@
  *  Interface to GiNaC's simp_lor objects. */
 
 /*
- *  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
@@ -31,9 +31,7 @@
 #include "indexed.h"
 #include "lorentzidx.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
 
 typedef std::pair<std::string,std::string> strstrpair;
 typedef std::pair<strstrpair,lorentzidx> spmapkey;
@@ -43,26 +41,13 @@ class spmapkey_is_less
 public:
        bool operator()(const spmapkey & lh, const spmapkey & rh) const
        {
-               /*
-               cerr << "spmapkey_is_less" << endl;
-               cerr << "lh=((" << lh.first.first
-                        << "," << lh.first.second << "),";
-               lh.second.printraw(cerr);
-               cerr << ")" << endl;
-
-               cerr << "rh=((" << rh.first.first
-                        << "," << rh.first.second << "),";
-               rh.second.printraw(cerr);
-               cerr << ")" << endl;
-               */
                bool res = lh.first<rh.first
                        || (!(rh.first<lh.first) && lh.second.compare(rh.second)<0);
-               // cout << "result=" << res << endl;
                return res;
        }
 };
 
-typedef map<spmapkey,ex,spmapkey_is_less> spmap;
+typedef std::map<spmapkey,ex,spmapkey_is_less> spmap;
 
 class simp_lor;
 
@@ -83,6 +68,8 @@ protected:
 /** Base class for simp_lor object */
 class simp_lor : public indexed
 {
+       GINAC_DECLARE_REGISTERED_CLASS(simp_lor, indexed)
+
 // friends
 
        friend class scalar_products;
@@ -100,18 +87,6 @@ public:
                simp_lor_vec
        } simp_lor_types;
        
-// member functions
-
-       // default constructor, destructor, copy constructor assignment operator and helpers
-public:
-       simp_lor();
-       ~simp_lor();
-       simp_lor(const simp_lor & other);
-       const simp_lor & operator=(const simp_lor & other);
-protected:
-       void copy(const simp_lor & other); 
-       void destroy(bool call_parent);
-
        // other constructors
 protected:
        simp_lor(simp_lor_types const t);
@@ -122,7 +97,6 @@ protected:
        
        // functions overriding virtual functions from base classes
 public:
-       basic * duplicate() const;
        void printraw(std::ostream & os) const;
        void printtree(std::ostream & os, unsigned indent) const;
        void print(std::ostream & os, unsigned upper_precedence=0) const;
@@ -130,7 +104,6 @@ public:
        bool info(unsigned inf) const;
        ex eval(int level=0) const;
 protected:
-       int compare_same_type(const basic & other) const;
        bool is_equal_same_type(const basic & other) const;
        unsigned return_type(void) const;
        unsigned return_type_tinfo(void) const;
@@ -151,11 +124,6 @@ protected:
        std::string name;
 };
 
-// global constants
-
-extern const simp_lor some_simp_lor;
-extern const type_info & typeid_simp_lor;
-
 // utility functions
 inline const simp_lor &ex_to_simp_lor(const ex &e)
 {
@@ -171,10 +139,7 @@ simp_lor lor_g(const ex & mu, const ex & nu);
 simp_lor lor_vec(const std::string & n, const ex & mu);
 ex simplify_simp_lor_mul(const ex & m, const scalar_products & sp);
 ex simplify_simp_lor(const ex & e, const scalar_products & sp=scalar_products());
-ex Dim(void);
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC
 
 #endif // ndef _SIMP__GINAC_LOR_H__