From aac27f42467a94f0688964d5fc7db0c23d2486c0 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Wed, 14 Feb 2001 18:42:20 +0000 Subject: [PATCH] added missing thisexprseq() to clifford class --- ginac/clifford.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++ ginac/clifford.h | 2 ++ ginac/lorentzidx.cpp | 2 +- ginac/lorentzidx.h | 2 +- ginac/lortensor.cpp | 3 +-- ginac/lortensor.h | 2 +- 6 files changed, 53 insertions(+), 5 deletions(-) diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index ce208891..8ab70652 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -26,6 +26,7 @@ #include "clifford.h" #include "ex.h" #include "ncmul.h" +#include "archive.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; } +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 ////////// @@ -152,6 +189,16 @@ bool clifford::is_equal_same_type(const basic & other) const 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); diff --git a/ginac/clifford.h b/ginac/clifford.h index 34329b06..4f0bb6b7 100644 --- a/ginac/clifford.h +++ b/ginac/clifford.h @@ -57,6 +57,8 @@ protected: // 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: diff --git a/ginac/lorentzidx.cpp b/ginac/lorentzidx.cpp index 8280e82d..ed6da8a2 100644 --- a/ginac/lorentzidx.cpp +++ b/ginac/lorentzidx.cpp @@ -1,6 +1,6 @@ /** @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 diff --git a/ginac/lorentzidx.h b/ginac/lorentzidx.h index 91c36444..c10d2366 100644 --- a/ginac/lorentzidx.h +++ b/ginac/lorentzidx.h @@ -1,6 +1,6 @@ /** @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 diff --git a/ginac/lortensor.cpp b/ginac/lortensor.cpp index fc3433ff..5d841366 100644 --- a/ginac/lortensor.cpp +++ b/ginac/lortensor.cpp @@ -1,7 +1,6 @@ /** @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 diff --git a/ginac/lortensor.h b/ginac/lortensor.h index 1eebc595..95af0241 100644 --- a/ginac/lortensor.h +++ b/ginac/lortensor.h @@ -1,6 +1,6 @@ /** @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 -- 2.44.0