1 #include <symengine/tuple.h>
7 Tuple::Tuple(
const vec_basic &container) : container_(container)
9 SYMENGINE_ASSIGN_TYPEID()
10 SYMENGINE_ASSERT(Tuple::is_canonical(container_));
13 bool Tuple::is_canonical(const vec_basic &container)
18 hash_t Tuple::__hash__()
const
20 hash_t seed = SYMENGINE_TUPLE;
21 for (
const auto &a : container_)
22 hash_combine<Basic>(seed, *a);
26 bool Tuple::__eq__(
const Basic &o)
const
29 const Tuple &other = down_cast<const Tuple &>(o);
30 return unified_eq(container_, other.container_);
35 int Tuple::compare(
const Basic &o)
const
37 SYMENGINE_ASSERT(is_a<Tuple>(o))
38 const Tuple &other = down_cast<const Tuple &>(o);
42 RCP<const Basic> tuple(
const vec_basic &arg)
44 return make_rcp<const Tuple>(arg);
The lowest unit of symbolic representation.
Main namespace for SymEngine package.
int unified_compare(const T &a, const T &b)