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