1 #ifndef SYMENGINE_BASIC_INL_H
2 #define SYMENGINE_BASIC_INL_H
17 return not(
eq(*
this, o));
38 return T::type_code_id == b.get_type_code();
44 return dynamic_cast<const T *
>(&b) !=
nullptr;
49 return a.get_type_code() == b.get_type_code();
62 hash_t &seed,
const T &v,
70 hash_t &seed,
const T &v,
73 seed ^= hash_t(v) + hash_t(0x9e3779b9) + (seed << 6) + (seed >> 2);
78 for (
const char &c : s) {
79 hash_combine<hash_t>(seed,
static_cast<hash_t
>(c));
100 template <
typename T>
101 hash_t vec_hash<T>::operator()(
const T &v)
const
105 hash_combine<typename T::value_type>(h, i);
110 template <
typename T>
113 #ifdef HAVE_SYMENGINE_STD_TO_STRING
125 } constantInitializer;
The lowest unit of symbolic representation.
bool __neq__(const Basic &o) const
true if this is not equal to o.
std::string __str__() const
virtual bool __eq__(const Basic &o) const =0
Test equality.
virtual hash_t __hash__() const =0
hash_t hash_
Private variables.
Main namespace for SymEngine package.
bool is_a_sub(const Basic &b)
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
void hash_combine(hash_t &seed, const T &v)
bool is_a(const Basic &b)
Templatised version to check is_a type.
bool is_same_type(const Basic &a, const Basic &b)
Returns true if a and b are exactly the same type T.
void hash_combine_impl(hash_t &seed, const T &v, typename std::enable_if< std::is_base_of< Basic, T >::value >::type *=nullptr)
Templatised version to combine hash.
bool neq(const Basic &a, const Basic &b)
Checks inequality for a and b
std::string to_string(const T &value)
workaround for MinGW bug
std::ostream & operator<<(std::ostream &out, const SymEngine::Basic &p)
<< Operator