GiNaC 1.8.7
|
The class function is used to implement builtin functions like sin, cos... and user defined functions. More...
#include <function.h>
Public Member Functions | |
function (unsigned ser) | |
function (unsigned ser, const ex ¶m1) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9, const ex ¶m10) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9, const ex ¶m10, const ex ¶m11) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9, const ex ¶m10, const ex ¶m11, const ex ¶m12) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9, const ex ¶m10, const ex ¶m11, const ex ¶m12, const ex ¶m13) | |
function (unsigned ser, const ex ¶m1, const ex ¶m2, const ex ¶m3, const ex ¶m4, const ex ¶m5, const ex ¶m6, const ex ¶m7, const ex ¶m8, const ex ¶m9, const ex ¶m10, const ex ¶m11, const ex ¶m12, const ex ¶m13, const ex ¶m14) | |
function (unsigned ser, const exprseq &es) | |
function (unsigned ser, const exvector &v) | |
function (unsigned ser, exvector &&v) | |
void | print (const print_context &c, unsigned level=0) const override |
Output to stream. More... | |
unsigned | precedence () const override |
Return relative operator precedence (for parenthezing output). More... | |
ex | expand (unsigned options=0) const override |
Expand expression, i.e. More... | |
ex | eval () const override |
Perform automatic non-interruptive term rewriting rules. More... | |
ex | evalf () const override |
Evaluate object numerically. More... | |
ex | eval_ncmul (const exvector &v) const override |
This method is defined to be in line with behavior of function::return_type() More... | |
unsigned | calchash () const override |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so. More... | |
ex | series (const relational &r, int order, unsigned options=0) const override |
Implementation of ex::series for functions. More... | |
ex | thiscontainer (const exvector &v) const override |
ex | thiscontainer (exvector &&v) const override |
ex | conjugate () const override |
Implementation of ex::conjugate for functions. More... | |
ex | real_part () const override |
Implementation of ex::real_part for functions. More... | |
ex | imag_part () const override |
Implementation of ex::imag_part for functions. More... | |
void | archive (archive_node &n) const override |
Archive the object. More... | |
void | read_archive (const archive_node &n, lst &syms) override |
Construct object from archive_node. More... | |
bool | info (unsigned inf) const override |
Implementation of ex::info for functions. More... | |
ex | power (const ex &exp) const |
unsigned | get_serial () const |
std::string | get_name () const |
Return the print name of the function. More... | |
Public Member Functions inherited from GiNaC::container< C > | |
container (STLT const &s) | |
container (STLT &&v) | |
container (exvector::const_iterator b, exvector::const_iterator e) | |
container (std::initializer_list< ex > il) | |
bool | info (unsigned inf) const override |
Information about the object. More... | |
unsigned | precedence () const override |
Return relative operator precedence (for parenthezing output). More... | |
size_t | nops () const override |
Number of operands/members. More... | |
ex | op (size_t i) const override |
Return operand/member at position i. More... | |
ex & | let_op (size_t i) override |
Return modifiable operand/member at position i. More... | |
ex | subs (const exmap &m, unsigned options=0) const override |
Substitute a set of objects by arbitrary expressions. More... | |
void | read_archive (const archive_node &n, lst &sym_lst) override |
Load (deserialize) the object from an archive node. More... | |
void | archive (archive_node &n) const override |
Archive the object. More... | |
container & | prepend (const ex &b) |
Add element at front. More... | |
container & | append (const ex &b) |
Add element at back. More... | |
container & | remove_first () |
Remove first element. More... | |
container & | remove_last () |
Remove last element. More... | |
container & | remove_all () |
Remove all elements. More... | |
container & | sort () |
Sort elements. More... | |
container & | unique () |
Remove adjacent duplicate elements. More... | |
const_iterator | begin () const |
const_iterator | end () const |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
Public Member Functions inherited from GiNaC::basic | |
virtual | ~basic () |
basic destructor, virtual because class ex will delete objects of derived classes via a basic*. More... | |
basic (const basic &other) | |
const basic & | operator= (const basic &other) |
basic assignment operator: the other object might be of a derived class. More... | |
virtual basic * | duplicate () const |
Create a clone of this object on the heap. More... | |
virtual ex | eval () const |
Perform automatic non-interruptive term rewriting rules. More... | |
virtual ex | evalf () const |
Evaluate object numerically. More... | |
virtual ex | evalm () const |
Evaluate sums, products and integer powers of matrices. More... | |
virtual ex | eval_integ () const |
Evaluate integrals, if result is known. More... | |
virtual ex | eval_indexed (const basic &i) const |
Perform automatic symbolic evaluations on indexed expression that contains this object as the base expression. More... | |
virtual void | print (const print_context &c, unsigned level=0) const |
Output to stream. More... | |
virtual void | dbgprint () const |
Little wrapper around print to be called within a debugger. More... | |
virtual void | dbgprinttree () const |
Little wrapper around printtree to be called within a debugger. More... | |
virtual unsigned | precedence () const |
Return relative operator precedence (for parenthezing output). More... | |
virtual bool | info (unsigned inf) const |
Information about the object. More... | |
virtual size_t | nops () const |
Number of operands/members. More... | |
virtual ex | op (size_t i) const |
Return operand/member at position i. More... | |
virtual ex | operator[] (const ex &index) const |
virtual ex | operator[] (size_t i) const |
virtual ex & | let_op (size_t i) |
Return modifiable operand/member at position i. More... | |
virtual ex & | operator[] (const ex &index) |
virtual ex & | operator[] (size_t i) |
virtual bool | has (const ex &other, unsigned options=0) const |
Test for occurrence of a pattern. More... | |
virtual bool | match (const ex &pattern, exmap &repls) const |
Check whether the expression matches a given pattern. More... | |
virtual ex | subs (const exmap &m, unsigned options=0) const |
Substitute a set of objects by arbitrary expressions. More... | |
virtual ex | map (map_function &f) const |
Construct new expression by applying the specified function to all sub-expressions (one level only, not recursively). More... | |
virtual void | accept (GiNaC::visitor &v) const |
virtual bool | is_polynomial (const ex &var) const |
Check whether this is a polynomial in the given variables. More... | |
virtual int | degree (const ex &s) const |
Return degree of highest power in object s. More... | |
virtual int | ldegree (const ex &s) const |
Return degree of lowest power in object s. More... | |
virtual ex | coeff (const ex &s, int n=1) const |
Return coefficient of degree n in object s. More... | |
virtual ex | expand (unsigned options=0) const |
Expand expression, i.e. More... | |
virtual ex | collect (const ex &s, bool distributed=false) const |
Sort expanded expression in terms of powers of some object(s). More... | |
virtual ex | series (const relational &r, int order, unsigned options=0) const |
Default implementation of ex::series(). More... | |
virtual ex | normal (exmap &repl, exmap &rev_lookup, lst &modifier) const |
Default implementation of ex::normal(). More... | |
virtual ex | to_rational (exmap &repl) const |
Default implementation of ex::to_rational(). More... | |
virtual ex | to_polynomial (exmap &repl) const |
virtual numeric | integer_content () const |
virtual ex | smod (const numeric &xi) const |
Apply symmetric modular homomorphism to an expanded multivariate polynomial. More... | |
virtual numeric | max_coefficient () const |
Implementation ex::max_coefficient(). More... | |
virtual exvector | get_free_indices () const |
Return a vector containing the free indices of an expression. More... | |
virtual ex | add_indexed (const ex &self, const ex &other) const |
Add two indexed expressions. More... | |
virtual ex | scalar_mul_indexed (const ex &self, const numeric &other) const |
Multiply an indexed expression with a scalar. More... | |
virtual bool | contract_with (exvector::iterator self, exvector::iterator other, exvector &v) const |
Try to contract two indexed expressions that appear in the same product. More... | |
virtual unsigned | return_type () const |
virtual return_type_t | return_type_tinfo () const |
virtual ex | conjugate () const |
virtual ex | real_part () const |
virtual ex | imag_part () const |
template<class T > | |
void | print_dispatch (const print_context &c, unsigned level) const |
Like print(), but dispatch to the specified class. More... | |
void | print_dispatch (const registered_class_info &ri, const print_context &c, unsigned level) const |
Like print(), but dispatch to the specified class. More... | |
virtual void | archive (archive_node &n) const |
Save (serialize) the object into archive node. More... | |
virtual void | read_archive (const archive_node &n, lst &syms) |
Load (deserialize) the object from an archive node. More... | |
ex | subs_one_level (const exmap &m, unsigned options) const |
Helper function for subs(). More... | |
ex | diff (const symbol &s, unsigned nth=1) const |
Default interface of nth derivative ex::diff(s, n). More... | |
int | compare (const basic &other) const |
Compare objects syntactically to establish canonical ordering. More... | |
bool | is_equal (const basic &other) const |
Test for syntactic equality. More... | |
const basic & | hold () const |
Stop further evaluation. More... | |
unsigned | gethash () const |
const basic & | setflag (unsigned f) const |
Set some status_flags. More... | |
const basic & | clearflag (unsigned f) const |
Clear some status_flags. More... | |
Public Member Functions inherited from GiNaC::refcounted | |
refcounted () noexcept | |
unsigned int | add_reference () noexcept |
unsigned int | remove_reference () noexcept |
unsigned int | get_refcount () const noexcept |
void | set_refcount (unsigned int r) noexcept |
Static Public Member Functions | |
static unsigned | register_new (function_options const &opt) |
static unsigned | find_function (const std::string &name, unsigned nparams) |
Find serial number of function by name and number of parameters. More... | |
static std::vector< function_options > | get_registered_functions () |
Static Public Attributes | |
static unsigned | current_serial = 0 |
This can be used as a hook for external applications. More... | |
Protected Member Functions | |
ex | derivative (const symbol &s) const override |
Implementation of ex::diff() for functions. More... | |
bool | is_equal_same_type (const basic &other) const override |
Returns true if two objects of same type are equal. More... | |
bool | match_same_type (const basic &other) const override |
Returns true if the attributes of two objects are similar enough for a match. More... | |
unsigned | return_type () const override |
return_type_t | return_type_tinfo () const override |
ex | pderivative (unsigned diff_param) const |
ex | expl_derivative (const symbol &s) const |
bool | lookup_remember_table (ex &result) const |
void | store_remember_table (ex const &result) const |
Protected Member Functions inherited from GiNaC::container< C > | |
ex | conjugate () const override |
ex | real_part () const override |
ex | imag_part () const override |
bool | is_equal_same_type (const basic &other) const override |
Returns true if two objects of same type are equal. More... | |
virtual ex | thiscontainer (const STLT &v) const |
Similar to duplicate(), but with a preset sequence. More... | |
virtual ex | thiscontainer (STLT &&v) const |
Similar to duplicate(), but with a preset sequence (which gets pilfered). More... | |
virtual void | printseq (const print_context &c, char openbracket, char delim, char closebracket, unsigned this_precedence, unsigned upper_precedence=0) const |
Print sequence of contained elements. More... | |
void | do_print (const print_context &c, unsigned level) const |
void | do_print_tree (const print_tree &c, unsigned level) const |
void | do_print_python (const print_python &c, unsigned level) const |
void | do_print_python_repr (const print_python_repr &c, unsigned level) const |
STLT | subschildren (const exmap &m, unsigned options=0) const |
Protected Member Functions inherited from GiNaC::basic | |
basic () | |
virtual ex | eval_ncmul (const exvector &v) const |
virtual bool | match_same_type (const basic &other) const |
Returns true if the attributes of two objects are similar enough for a match. More... | |
virtual ex | derivative (const symbol &s) const |
Default implementation of ex::diff(). More... | |
virtual int | compare_same_type (const basic &other) const |
Returns order relation between two objects of same type. More... | |
virtual bool | is_equal_same_type (const basic &other) const |
Returns true if two objects of same type are equal. More... | |
virtual unsigned | calchash () const |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so. More... | |
void | ensure_if_modifiable () const |
Ensure the object may be modified without hurting others, throws if this is not the case. More... | |
void | do_print (const print_context &c, unsigned level) const |
Default output to stream. More... | |
void | do_print_tree (const print_tree &c, unsigned level) const |
Tree output to stream. More... | |
void | do_print_python_repr (const print_python_repr &c, unsigned level) const |
Python parsable output to stream. More... | |
Protected Member Functions inherited from GiNaC::container_storage< C > | |
container_storage () | |
container_storage (size_t n, const ex &e) | |
container_storage (std::initializer_list< ex > il) | |
template<class In > | |
container_storage (In b, In e) | |
void | reserve (size_t) |
~container_storage () | |
void | reserve (size_t n) |
void | reserve (std::vector< ex > &v, size_t n) |
Static Protected Member Functions | |
static std::vector< function_options > & | registered_functions () |
Static Protected Member Functions inherited from GiNaC::container< C > | |
static unsigned | get_default_flags () |
Specialization of container::get_default_flags() for lst. More... | |
static char | get_open_delim () |
Specialization of container::get_open_delim() for lst. More... | |
static char | get_close_delim () |
Specialization of container::get_close_delim() for lst. More... | |
Static Protected Member Functions inherited from GiNaC::container_storage< C > | |
static void | reserve (STLT &, size_t) |
Protected Attributes | |
unsigned | serial |
Protected Attributes inherited from GiNaC::basic | |
unsigned | flags |
of type status_flags More... | |
unsigned | hashvalue |
hash value More... | |
Protected Attributes inherited from GiNaC::container_storage< C > | |
STLT | seq |
Friends | |
class | remember_table_entry |
Additional Inherited Members | |
Public Types inherited from GiNaC::container< C > | |
typedef STLT::const_iterator | const_iterator |
typedef STLT::const_reverse_iterator | const_reverse_iterator |
Protected Types inherited from GiNaC::container< C > | |
typedef container_storage< C >::STLT | STLT |
Protected Types inherited from GiNaC::container_storage< C > | |
typedef C< ex > | STLT |
The class function is used to implement builtin functions like sin, cos... and user defined functions.
Definition at line 673 of file function.h.
GiNaC::function::function | ( | unsigned | ser | ) |
Definition at line 1198 of file function.cpp.
Referenced by GiNaC::fderivative::eval(), evalf(), and thiscontainer().
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1 | ||
) |
Definition at line 1203 of file function.cpp.
Definition at line 1207 of file function.cpp.
Definition at line 1211 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4 | ||
) |
Definition at line 1215 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5 | ||
) |
Definition at line 1219 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6 | ||
) |
Definition at line 1223 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7 | ||
) |
Definition at line 1227 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8 | ||
) |
Definition at line 1231 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9 | ||
) |
Definition at line 1235 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9, | ||
const ex & | param10 | ||
) |
Definition at line 1239 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9, | ||
const ex & | param10, | ||
const ex & | param11 | ||
) |
Definition at line 1243 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9, | ||
const ex & | param10, | ||
const ex & | param11, | ||
const ex & | param12 | ||
) |
Definition at line 1247 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9, | ||
const ex & | param10, | ||
const ex & | param11, | ||
const ex & | param12, | ||
const ex & | param13 | ||
) |
Definition at line 1251 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const ex & | param1, | ||
const ex & | param2, | ||
const ex & | param3, | ||
const ex & | param4, | ||
const ex & | param5, | ||
const ex & | param6, | ||
const ex & | param7, | ||
const ex & | param8, | ||
const ex & | param9, | ||
const ex & | param10, | ||
const ex & | param11, | ||
const ex & | param12, | ||
const ex & | param13, | ||
const ex & | param14 | ||
) |
Definition at line 1255 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
const exprseq & | es | ||
) |
Definition at line 1260 of file function.cpp.
References GiNaC::basic::clearflag(), and GiNaC::status_flags::evaluated.
GiNaC::function::function | ( | unsigned | ser, |
const exvector & | v | ||
) |
Definition at line 1268 of file function.cpp.
GiNaC::function::function | ( | unsigned | ser, |
exvector && | v | ||
) |
Definition at line 1273 of file function.cpp.
|
overridevirtual |
Output to stream.
This performs double dispatch on the dynamic type of *this and the dynamic type of the supplied print context.
c | print context object that describes the output formatting |
level | value that is used to identify the precedence or indentation level for placing parentheses and formatting |
Reimplemented from GiNaC::basic.
Definition at line 1320 of file function.cpp.
References c, current_serial, GiNaC::basic::flags, GiNaC::class_info< OPT >::get_parent(), GINAC_ASSERT, GiNaC::basic::hashvalue, GiNaC::function_options::name, GiNaC::container< C >::nops(), GiNaC::function_options::nparams, GiNaC::class_info< OPT >::options, GiNaC::container< C >::precedence(), precedence(), print(), GiNaC::function_options::print_dispatch_table, GiNaC::function_options::print_use_exvector_args, GiNaC::container< C >::printseq(), registered_functions(), GiNaC::container_storage< C >::seq, serial, and GiNaC::function_options::TeX_name.
Referenced by print().
|
inlineoverridevirtual |
Return relative operator precedence (for parenthezing output).
Reimplemented from GiNaC::container< C >.
Definition at line 707 of file function.h.
Referenced by GiNaC::fderivative::do_print(), GiNaC::fderivative::do_print_csrc(), GiNaC::fderivative::do_print_latex(), and print().
|
overridevirtual |
Expand expression, i.e.
multiply it out and return the result as a new expression.
Reimplemented from GiNaC::basic.
Definition at line 2175 of file function.cpp.
References current_serial, GiNaC::expand(), GiNaC::function_options::expand_f, GiNaC::expand_options::expand_function_args, GiNaC::function_options::expand_use_exvector_args, GiNaC::status_flags::expanded, GINAC_ASSERT, GiNaC::function_options::nparams, options, registered_functions(), GiNaC::container_storage< C >::seq, serial, and GiNaC::basic::setflag().
|
overridevirtual |
Perform automatic non-interruptive term rewriting rules.
Reimplemented from GiNaC::basic.
Definition at line 1428 of file function.cpp.
References GiNaC::_ex0, GiNaC::canonicalize(), current_serial, GiNaC::function_options::eval_f, GiNaC::function_options::eval_use_exvector_args, GiNaC::status_flags::evaluated, GiNaC::basic::ex, GiNaC::basic::flags, GINAC_ASSERT, GiNaC::basic::hold(), GiNaC::ex::is_zero(), lookup_remember_table(), GiNaC::function_options::nparams, registered_functions(), GiNaC::container_storage< C >::seq, serial, store_remember_table(), GiNaC::function_options::symtree, thiscontainer(), and GiNaC::function_options::use_remember.
|
overridevirtual |
Evaluate object numerically.
Reimplemented from GiNaC::basic.
Definition at line 1517 of file function.cpp.
References current_serial, GiNaC::function_options::evalf_f, GiNaC::function_options::evalf_params_first, GiNaC::function_options::evalf_use_exvector_args, function(), GINAC_ASSERT, GiNaC::function_options::nparams, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
Referenced by GiNaC::iterated_integral2_eval(), and GiNaC::iterated_integral3_eval().
This method is defined to be in line with behavior of function::return_type()
Reimplemented from GiNaC::basic.
Definition at line 1577 of file function.cpp.
References GiNaC::container_storage< C >::seq.
|
overridevirtual |
Compute the hash value of an object and if it makes sense to store it in the objects status_flags, do so.
The method inherited from class basic computes a hash value based on the type and hash values of possible members. For this reason it is well suited for container classes but atomic classes should override this implementation because otherwise they would all end up with the same hashvalue.
Reimplemented from GiNaC::basic.
Definition at line 1584 of file function.cpp.
References GiNaC::status_flags::evaluated, GiNaC::basic::flags, GiNaC::ex::gethash(), GiNaC::golden_ratio_hash(), GiNaC::status_flags::hash_calculated, GiNaC::basic::hashvalue, GiNaC::make_hash_seed(), GiNaC::container< C >::nops(), GiNaC::container< C >::op(), GiNaC::rotate_left(), serial, and GiNaC::basic::setflag().
|
overridevirtual |
Implementation of ex::series for functions.
@see ex::series
Reimplemented from GiNaC::basic.
Definition at line 1611 of file function.cpp.
References current_serial, GINAC_ASSERT, GiNaC::function_options::nparams, options, order, r, registered_functions(), GiNaC::container_storage< C >::seq, serial, GiNaC::basic::series(), GiNaC::function_options::series_f, and GiNaC::function_options::series_use_exvector_args.
Definition at line 1599 of file function.cpp.
References function(), and serial.
Referenced by eval().
Definition at line 1604 of file function.cpp.
References function(), and serial.
|
overridevirtual |
Implementation of ex::conjugate for functions.
Reimplemented from GiNaC::container< C >.
Definition at line 1735 of file function.cpp.
References GiNaC::function_options::conjugate_f, GiNaC::function_options::conjugate_use_exvector_args, GINAC_ASSERT, GiNaC::function_options::nparams, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
|
overridevirtual |
Implementation of ex::real_part for functions.
Reimplemented from GiNaC::container< C >.
Definition at line 1784 of file function.cpp.
References GINAC_ASSERT, GiNaC::function_options::nparams, GiNaC::basic::real_part(), GiNaC::function_options::real_part_f, GiNaC::function_options::real_part_use_exvector_args, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
|
overridevirtual |
Implementation of ex::imag_part for functions.
Reimplemented from GiNaC::container< C >.
Definition at line 1831 of file function.cpp.
References GINAC_ASSERT, GiNaC::basic::imag_part(), GiNaC::function_options::imag_part_f, GiNaC::function_options::imag_part_use_exvector_args, GiNaC::function_options::nparams, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
|
overridevirtual |
Archive the object.
Reimplemented from GiNaC::container< C >.
Definition at line 1305 of file function.cpp.
References GINAC_ASSERT, n, registered_functions(), and serial.
|
overridevirtual |
Construct object from archive_node.
Reimplemented from GiNaC::container< C >.
Definition at line 1283 of file function.cpp.
References n, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
|
overridevirtual |
Implementation of ex::info for functions.
Reimplemented from GiNaC::container< C >.
Definition at line 1878 of file function.cpp.
References GINAC_ASSERT, GiNaC::basic::info(), GiNaC::function_options::info_f, GiNaC::function_options::info_use_exvector_args, GiNaC::function_options::nparams, registered_functions(), GiNaC::container_storage< C >::seq, and serial.
Implementation of ex::diff() for functions.
It applies the chain rule, except for the Order term function. @see ex::diff
Reimplemented from GiNaC::basic.
Definition at line 1931 of file function.cpp.
References expl_derivative(), GiNaC::ex::is_zero(), pderivative(), and GiNaC::container_storage< C >::seq.
|
overrideprotectedvirtual |
Returns true if two objects of same type are equal.
Normally needs not be reimplemented as long as it wasn't overwritten by some parent class, since it just calls compare_same_type(). The reason why this function exists is that sometimes it is easier to determine equality than an order relation and then it can be overridden.
Reimplemented from GiNaC::container< C >.
Definition at line 1967 of file function.cpp.
References GINAC_ASSERT, GiNaC::container< C >::is_equal_same_type(), and serial.
|
overrideprotectedvirtual |
Returns true if the attributes of two objects are similar enough for a match.
This function must not match subexpressions (this is already done by basic::match()). Only attributes not accessible by op() should be compared. This is also the reason why this function doesn't take the wildcard replacement list from match() as an argument: only subexpressions are subject to wildcard matches. Also, this function only needs to be implemented for container classes because is_equal_same_type() is automatically used instead of match_same_type() if nops() == 0.
Reimplemented from GiNaC::basic.
Definition at line 1978 of file function.cpp.
References GINAC_ASSERT, and serial.
|
overrideprotectedvirtual |
Reimplemented from GiNaC::basic.
Definition at line 1986 of file function.cpp.
References GiNaC::return_types::commutative, GINAC_ASSERT, registered_functions(), GiNaC::function_options::return_type, GiNaC::container_storage< C >::seq, serial, and GiNaC::function_options::use_return_type.
|
overrideprotectedvirtual |
Reimplemented from GiNaC::basic.
Definition at line 2004 of file function.cpp.
References GINAC_ASSERT, registered_functions(), GiNaC::function_options::return_type_tinfo, GiNaC::container_storage< C >::seq, serial, and GiNaC::function_options::use_return_type.
|
protected |
Definition at line 2034 of file function.cpp.
References GiNaC::function_options::derivative_f, GiNaC::function_options::derivative_use_exvector_args, GINAC_ASSERT, and GiNaC::function_options::nparams.
Referenced by derivative(), and GiNaC::fderivative::eval().
Definition at line 2081 of file function.cpp.
References GiNaC::function_options::expl_derivative_f, GiNaC::function_options::expl_derivative_use_exvector_args, GINAC_ASSERT, and GiNaC::function_options::nparams.
Referenced by derivative().
|
staticprotected |
Definition at line 2225 of file function.cpp.
Referenced by archive(), conjugate(), GiNaC::fderivative::do_print(), GiNaC::fderivative::do_print_csrc(), GiNaC::fderivative::do_print_latex(), GiNaC::fderivative::do_print_tree(), GiNaC::fderivative::eval(), eval(), evalf(), expand(), find_function(), get_name(), get_registered_functions(), imag_part(), info(), print(), read_archive(), real_part(), register_new(), return_type(), return_type_tinfo(), and series().
|
protected |
Definition at line 2231 of file function.cpp.
References GiNaC::remember_table::remember_tables(), and serial.
Referenced by eval().
|
protected |
Definition at line 2236 of file function.cpp.
References GiNaC::remember_table::remember_tables(), and serial.
Referenced by eval().
Definition at line 2128 of file function.cpp.
References GiNaC::status_flags::evaluated, GINAC_ASSERT, GiNaC::function_options::nparams, GiNaC::function_options::power_f, and GiNaC::function_options::power_use_exvector_args.
|
static |
Definition at line 2243 of file function.cpp.
References GiNaC::function_options::functions_with_same_name, GiNaC::function_options::name, registered_functions(), GiNaC::function_options::remember_assoc_size, GiNaC::function_options::remember_size, GiNaC::function_options::remember_strategy, GiNaC::remember_table::remember_tables(), and GiNaC::function_options::use_remember.
|
static |
Find serial number of function by name and number of parameters.
Throws exception if function was not found.
Definition at line 2272 of file function.cpp.
References registered_functions(), and serial.
|
inlinestatic |
Definition at line 744 of file function.h.
References registered_functions().
|
inline |
Definition at line 745 of file function.h.
References serial.
std::string GiNaC::function::get_name | ( | ) | const |
Return the print name of the function.
Definition at line 2284 of file function.cpp.
References GINAC_ASSERT, registered_functions(), and serial.
|
friend |
Definition at line 677 of file function.h.
|
static |
|
protected |
Definition at line 751 of file function.h.
Referenced by archive(), calchash(), conjugate(), GiNaC::fderivative::derivative(), GiNaC::fderivative::do_print(), GiNaC::fderivative::do_print_csrc(), GiNaC::fderivative::do_print_latex(), GiNaC::fderivative::do_print_tree(), GiNaC::fderivative::eval(), eval(), evalf(), expand(), find_function(), get_name(), get_serial(), imag_part(), info(), is_equal_same_type(), lookup_remember_table(), match_same_type(), print(), read_archive(), real_part(), return_type(), return_type_tinfo(), series(), store_remember_table(), GiNaC::fderivative::thiscontainer(), and thiscontainer().