trace.h
1 #ifndef SYMENGINE_MATRICES_TRACE_H
2 #define SYMENGINE_MATRICES_TRACE_H
3 
4 #include <symengine/basic.h>
5 #include <symengine/matrices/matrix_expr.h>
6 
7 namespace SymEngine
8 {
9 
10 class Trace : public Basic
11 {
12 private:
13  RCP<const Basic> arg_;
14 
15 public:
16  Trace(const RCP<const MatrixExpr> &arg) : arg_(arg)
17  {
18  SYMENGINE_ASSIGN_TYPEID();
19  }
20 
21  IMPLEMENT_TYPEID(SYMENGINE_TRACE)
22  hash_t __hash__() const override;
23  bool __eq__(const Basic &o) const override;
24  int compare(const Basic &o) const override;
25  vec_basic get_args() const override;
26 };
27 
28 RCP<const Basic> trace(const RCP<const MatrixExpr> &arg);
29 } // namespace SymEngine
30 
31 #endif
The base class for SymEngine.
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
Definition: basic.h:340
The lowest unit of symbolic representation.
Definition: basic.h:97
hash_t __hash__() const override
Definition: trace.cpp:9
bool __eq__(const Basic &o) const override
Test equality.
Definition: trace.cpp:16
int compare(const Basic &o) const override
Definition: trace.cpp:21
vec_basic get_args() const override
Returns the list of arguments.
Definition: trace.cpp:28
Main namespace for SymEngine package.
Definition: add.cpp:19