38 :
public std::enable_shared_from_this<AbstractGammaSym>
43 using iterator = std::vector<GExpr>::iterator;
44 using const_iterator = std::vector<GExpr>::const_iterator;
48 virtual size_t size()
const = 0;
49 virtual GExpr const &argument(
size_t i)
const = 0;
50 virtual GExpr &argument(
size_t i) = 0;
51 virtual iterator begin() = 0;
52 virtual const_iterator begin()
const = 0;
53 virtual iterator end() = 0;
54 virtual const_iterator end()
const = 0;
56 virtual bool isZero()
const = 0;
58 virtual bool hasPropertyWith(
GExpr const &other)
const;
59 virtual GExpr propertyWith(
GExpr const &other)
const;
62 virtual GExpr getTerm()
const;
65 virtual GExpr copy()
const = 0;
66 virtual GExpr refresh()
const = 0;
68 virtual GExpr simplify();
70 virtual std::vector<csl::Index>
const &indices()
const;
71 virtual std::vector<csl::Index> &indices() ;
73 virtual bool contains(
csl::Index const &)
const = 0;
81 virtual void print(std::ostream &out = std::cout)
const = 0;
82 void errorPrint()
const {
91 using iterator = AbstractGammaSym::iterator;
92 using const_iterator = AbstractGammaSym::const_iterator;
101 size_t size()
const {
return (**this).size(); }
102 GExpr &operator[](
size_t i) {
return (**this).argument(i); }
103 GExpr const &operator[](
size_t i)
const {
return (**this).argument(i); }
104 iterator begin() {
return (**this).begin(); }
105 const_iterator begin()
const {
return (**this).begin(); }
106 iterator end() {
return (**this).end(); }
107 const_iterator end()
const {
return (**this).end(); }
Definition: tensorset.h:30
std::ostream & operator<<(std::ostream &fout, csl::Type type)
Expr operator+(const Expr &a, const Expr &b)
Definition: abstractgammasym.h:87
Expr operator-(const Expr &a, const Expr &b)
Definition: abstractgammasym.h:32
Expr operator/(const Expr &a, const Expr &b)
Expr operator*(const Expr &a, const Expr &b)
Definition: abstractgammasym.h:37