tuple.h
1 #ifndef SYMENGINE_TUPLE_H
2 #define SYMENGINE_TUPLE_H
3 
4 #include <symengine/basic.h>
5 
6 namespace SymEngine
7 {
8 
9 class Tuple : public Basic
10 {
11 private:
12  vec_basic container_;
13 
14 public:
15  IMPLEMENT_TYPEID(SYMENGINE_TUPLE)
16  Tuple(const vec_basic &container);
17 
18  hash_t __hash__() const override;
19  bool __eq__(const Basic &o) const override;
20  int compare(const Basic &o) const override;
21  static bool is_canonical(const vec_basic &container);
22 
23  vec_basic get_args() const override
24  {
25  return vec_basic(container_.begin(), container_.end());
26  }
27 };
28 
29 RCP<const Basic> tuple(const vec_basic &arg);
30 
31 } // namespace SymEngine
32 #endif
The base class for SymEngine.
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
Definition: basic.h:340
T begin(T... args)
The lowest unit of symbolic representation.
Definition: basic.h:97
hash_t __hash__() const override
Definition: tuple.cpp:18
bool __eq__(const Basic &o) const override
Test equality.
Definition: tuple.cpp:26
vec_basic get_args() const override
Returns the list of arguments.
Definition: tuple.h:23
int compare(const Basic &o) const override
Definition: tuple.cpp:35
T end(T... args)
Main namespace for SymEngine package.
Definition: add.cpp:19