6 #ifndef SYMENGINE_SYMBOL_H
7 #define SYMENGINE_SYMBOL_H
23 explicit Symbol(
const std::string &name);
25 hash_t __hash__()
const override;
30 bool __eq__(
const Basic &o)
const override;
36 int compare(
const Basic &o)
const override;
47 RCP<const Symbol> as_dummy()
const;
54 #ifdef WITH_SYMENGINE_THREAD_SAFE
55 static std::atomic<size_t> count_;
66 explicit Dummy(
const std::string &name);
67 Dummy(
const std::string &name,
size_t index);
69 hash_t __hash__()
const override;
74 bool __eq__(
const Basic &o)
const override;
79 int compare(
const Basic &o)
const override;
80 size_t get_index()
const
87 inline RCP<const Symbol>
symbol(
const std::string &name)
89 return make_rcp<const Symbol>(name);
95 return make_rcp<const Dummy>();
98 inline RCP<const Dummy>
dummy(
const std::string &name)
100 return make_rcp<const Dummy>(name);
103 inline RCP<const Dummy>
dummy(
const std::string &name,
size_t dummy_index)
105 return make_rcp<const Dummy>(name, dummy_index);
108 inline bool is_a_Symbol(
const Basic &b)
110 return b.get_type_code() == SYMENGINE_SYMBOL
111 || b.get_type_code() == SYMENGINE_DUMMY;
The base class for SymEngine.
#define IMPLEMENT_TYPEID(SYMENGINE_ID)
Inline members and functions.
The lowest unit of symbolic representation.
size_t dummy_index
Dummy index.
static size_t count_
Dummy count.
const std::string & get_name() const
std::string name_
name of Symbol
vec_basic get_args() const override
Returns the list of arguments.
Main namespace for SymEngine package.
RCP< const Dummy > dummy()
inline version to return Dummy
RCP< const Symbol > symbol(const std::string &name)
inline version to return Symbol