transpose.h
1 #ifndef SYMENGINE_MATRICES_TRANSPOSE_H
2 #define SYMENGINE_MATRICES_TRANSPOSE_H
3 
4 #include <symengine/basic.h>
5 #include <symengine/matrices/matrix_expr.h>
6 
7 namespace SymEngine
8 {
9 
10 class Transpose : public MatrixExpr
11 {
12 private:
13  RCP<const MatrixExpr> arg_;
14 
15 public:
16  Transpose(const RCP<const MatrixExpr> &arg) : arg_(arg)
17  {
18  SYMENGINE_ASSIGN_TYPEID();
19  SYMENGINE_ASSERT(is_canonical(arg));
20  }
21 
22  IMPLEMENT_TYPEID(SYMENGINE_TRANSPOSE)
23  hash_t __hash__() const override;
24  bool __eq__(const Basic &o) const override;
25  int compare(const Basic &o) const override;
26  bool is_canonical(const RCP<const MatrixExpr> &arg) const;
27  vec_basic get_args() const override;
28 
29  inline RCP<const MatrixExpr> get_arg() const
30  {
31  return arg_;
32  }
33 };
34 
35 RCP<const MatrixExpr> transpose(const RCP<const MatrixExpr> &arg);
36 } // namespace SymEngine
37 
38 #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
vec_basic get_args() const override
Returns the list of arguments.
Definition: transpose.cpp:40
bool __eq__(const Basic &o) const override
Test equality.
Definition: transpose.cpp:16
int compare(const Basic &o) const override
Definition: transpose.cpp:33
hash_t __hash__() const override
Definition: transpose.cpp:9
Main namespace for SymEngine package.
Definition: add.cpp:19