]> www.ginac.de Git - ginac.git/commitdiff
added missing thisexprseq() to clifford class
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 14 Feb 2001 18:42:20 +0000 (18:42 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Wed, 14 Feb 2001 18:42:20 +0000 (18:42 +0000)
ginac/clifford.cpp
ginac/clifford.h
ginac/lorentzidx.cpp
ginac/lorentzidx.h
ginac/lortensor.cpp
ginac/lortensor.h

index ce2088916bff33c928445da31413a974305fb79e..8ab70652551a562ef2ccdba5591223645d68781b 100644 (file)
@@ -26,6 +26,7 @@
 #include "clifford.h"
 #include "ex.h"
 #include "ncmul.h"
 #include "clifford.h"
 #include "ex.h"
 #include "ncmul.h"
+#include "archive.h"
 #include "utils.h"
 #include "debugmsg.h"
 
 #include "utils.h"
 #include "debugmsg.h"
 
@@ -93,6 +94,42 @@ clifford::clifford(const std::string & n, const ex & mu) : inherited(lortensor_s
        tinfo_key=TINFO_clifford;
 }
 
        tinfo_key=TINFO_clifford;
 }
 
+clifford::clifford(const std::string & n, const exvector & iv) : inherited(lortensor_symbolic, n, iv)
+{
+       debugmsg("clifford constructor from string,exvector", LOGLEVEL_CONSTRUCT);
+       GINAC_ASSERT(all_of_type_lorentzidx());
+       tinfo_key=TINFO_clifford;
+}
+
+clifford::clifford(const std::string & n, exvector *ivp) : inherited(lortensor_symbolic, n, *ivp)
+{
+       debugmsg("clifford constructor from string,exvector", LOGLEVEL_CONSTRUCT);
+       GINAC_ASSERT(all_of_type_lorentzidx());
+       tinfo_key=TINFO_clifford;
+}
+
+//////////
+// archiving
+//////////
+
+/** Construct object from archive_node. */
+clifford::clifford(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
+{
+       debugmsg("clifford constructor from archive_node", LOGLEVEL_CONSTRUCT);
+}
+
+/** Unarchive the object. */
+ex clifford::unarchive(const archive_node &n, const lst &sym_lst)
+{
+       return (new clifford(n, sym_lst))->setflag(status_flags::dynallocated);
+}
+
+/** Archive the object. */
+void clifford::archive(archive_node &n) const
+{
+       inherited::archive(n);
+}
+
 //////////
 // functions overriding virtual functions from bases classes
 //////////
 //////////
 // functions overriding virtual functions from bases classes
 //////////
@@ -152,6 +189,16 @@ bool clifford::is_equal_same_type(const basic & other) const
        return exprseq::is_equal_same_type(other);
 }
 
        return exprseq::is_equal_same_type(other);
 }
 
+ex clifford::thisexprseq(const exvector & v) const
+{
+       return clifford(name, v);
+}
+
+ex clifford::thisexprseq(exvector *vp) const
+{
+       return clifford(name, vp);
+}
+
 ex clifford::simplify_ncmul(const exvector & v) const
 {
        return simplified_ncmul(v);
 ex clifford::simplify_ncmul(const exvector & v) const
 {
        return simplified_ncmul(v);
index 34329b06f65670835f060ef7fbdd484475a704d0..4f0bb6b7474756d033819bb264d582db3a2b5273 100644 (file)
@@ -57,6 +57,8 @@ protected:
        // other constructors
 public:
        clifford(const std::string & n, const ex & mu);
        // other constructors
 public:
        clifford(const std::string & n, const ex & mu);
+       clifford(const std::string & n, const exvector & iv);
+       clifford(const std::string & n, exvector * ivp);
 
        // functions overriding virtual functions from base classes
 public:
 
        // functions overriding virtual functions from base classes
 public:
index 8280e82d17592a3e75202dc54cae84c01cea4266..ed6da8a2c65b47364bbd09efa0f3e8d82e0adef1 100644 (file)
@@ -1,6 +1,6 @@
 /** @file lorentzidx.cpp
  *
 /** @file lorentzidx.cpp
  *
- *  Implementation of GiNaC's lorentz indices. */
+ *  Implementation of GiNaC's Lorentz indices. */
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
index 91c364440dafc2977a9258755ff3604253bc9a5b..c10d2366202dfe3afc9e3c11951fba3a111cd8c1 100644 (file)
@@ -1,6 +1,6 @@
 /** @file lorentzidx.h
  *
 /** @file lorentzidx.h
  *
- *  Interface to GiNaC's lorentz indices. */
+ *  Interface to GiNaC's Lorentz indices. */
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
index fc3433ffac48477b76a171e746871d5e7449c557..5d841366d8cbd8a44b98b87ffcea667d0d187b41 100644 (file)
@@ -1,7 +1,6 @@
 /** @file lortensor.cpp
  *
 /** @file lortensor.cpp
  *
- *  Implementation of GiNaC´s lortensor objects.
- *  No real implementation yet, do be done.      */
+ *  Implementation of GiNaC's Lorentz tensors. */
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
index 1eebc595fdb8899d445e10db1e629e7b14d24bf3..95af02412abccc2d9898403de87c6592304260f6 100644 (file)
@@ -1,6 +1,6 @@
 /** @file lortensor.h
  *
 /** @file lortensor.h
  *
- *  Interface to GiNaC´s lortensor objects. */
+ *  Interface to GiNaC's Lorentz tensors. */
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany
 
 /*
  *  GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany