Documentation of CSL
typedef.h
Go to the documentation of this file.
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
23 #ifndef TYPEDEF_H_INCLUDED
24 #define TYPEDEF_H_INCLUDED
25 
26 #include <memory>
27 #include <vector>
28 #include "allocator.h"
29 
30 namespace csl {
31 
32  class Abstract;
33  class AbstractParent;
34  class TensorParent;
35  class Parent;
36  class Tensor;
37  class Expr;
38  typedef const csl::Abstract* Expr_info;
39 
40  //typedef std::shared_ptr<csl::Abstract> Expr;
42 
43  typedef std::unique_ptr<csl::Abstract> unique_Expr;
44  typedef std::unique_ptr<const csl::Abstract> unique_Expr_c;
45 
46  typedef std::weak_ptr<csl::Abstract> weak_Expr;
47  typedef std::weak_ptr<const csl::Abstract> weak_Expr_c;
48 
49 
50  typedef const csl::AbstractParent* Parent_info;
51  // typedef std::shared_ptr<csl::AbstractParent> Parent;
52  typedef const csl::TensorParent* IParent_info;
53  // typedef std::shared_ptr<csl::TensorParent> Tensor;
54 
55  using Vector_alloc = std::allocator<Expr>;
56  // using vector_expr = std::vector<Expr, Vector_alloc>;
57  using vector_expr = std::vector<Expr>;
58 
59  inline Vector_alloc alloc_expr;
60 }
61 
62 #endif
Namespace for csl library.
Definition: abreviation.h:34
Parent of an indicial object, allows to generate them (TensorElement).
Definition: indicial.h:245
Definition: diagonalization.h:34
Root class of the inheritance tree of abstracts.
Definition: abstract.h:76
Base class for all parents (indicial, fields etc). All parents derive from this class.
Definition: parent.h:81