59 inherited::read_archive(n, sym_lst);
67 inherited::archive(n);
93 c.
s << std::string(level,
' ') << class_name() <<
"(" <<
label <<
")" <<
" @" <<
this
94 << std::hex <<
", hash=0x" <<
hashvalue <<
", flags=0x" <<
flags << std::dec
100 c.
s << class_name() <<
'(' <<
label <<
')';
126 for (
size_t i=0; i<x.
nops(); ++i)
Archiving of GiNaC expressions.
#define GINAC_ASSERT(X)
Assertion macro for checking invariances.
This class stores all properties needed to record/retrieve the state of one object of class basic (or...
bool find_unsigned(const std::string &name, unsigned &ret, unsigned index=0) const
Retrieve property of type "unsigned" from node.
void add_unsigned(const std::string &name, unsigned value)
Add property of type "unsigned int" to node.
This class is the ABC (abstract base class) of GiNaC's class hierarchy.
const basic & setflag(unsigned f) const
Set some status_flags.
unsigned hashvalue
hash value
unsigned flags
of type status_flags
bool is_equal(const basic &other) const
Test for syntactic equality.
virtual int compare_same_type(const basic &other) const
Returns order relation between two objects of same type.
Lightweight wrapper for GiNaC's symbolic objects.
Base class for print_contexts.
std::ostream & s
stream to output to
Context for python-parsable output.
Context for tree-like output for debugging.
@ expanded
.expand(0) has already done its job (other expand() options ignore this flag)
@ evaluated
.eval() has already done its job
@ hash_calculated
.calchash() has already done its job
This class acts as a wildcard for subs(), match(), has() and find().
bool match(const ex &pattern, exmap &repl_lst) const override
Check whether the expression matches a given pattern.
void read_archive(const archive_node &n, lst &syms) override
Read (a.k.a.
wildcard(unsigned label)
Construct wildcard with specified label.
unsigned calchash() const override
Compute the hash value of an object and if it makes sense to store it in the objects status_flags,...
void archive(archive_node &n) const override
Save (a.k.a.
void do_print(const print_context &c, unsigned level) const
unsigned label
Label used to distinguish different wildcards.
void do_print_python_repr(const print_python_repr &c, unsigned level) const
void do_print_tree(const print_tree &c, unsigned level) const
bool haswild(const ex &x)
Check whether x has a wildcard anywhere as a subexpression.
unsigned golden_ratio_hash(uintptr_t n)
Truncated multiplication with golden ratio, for computing hash values.
container< std::list > lst
std::map< ex, ex, ex_is_less > exmap
attribute_pure const T & ex_to(const ex &e)
Return a reference to the basic-derived class T object embedded in an expression.
GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(lst, basic, print_func< print_context >(&lst::do_print). print_func< print_tree >(&lst::do_print_tree)) template<> bool ls GINAC_BIND_UNARCHIVER)(lst)
Specialization of container::info() for lst.
print_func< print_context >(&varidx::do_print). print_func< print_latex >(&varidx
bool is_a(const basic &obj)
Check if obj is a T, including base classes.
static unsigned make_hash_seed(const std::type_info &tinfo)
We need a hash function which gives different values for objects of different types.
#define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(classname, supername, options)
Macro for inclusion in the implementation of each registered class.
Interface to several small and furry utilities needed within GiNaC but not of any interest to the use...
Interface to GiNaC's wildcard objects.