|
HepLib
|
Basic Functions, extend GiNaC, etc. More...

Go to the source code of this file.
Namespaces | |
| namespace | HepLib |
| HepLib namespace. | |
Typedefs | |
| typedef vector< pair< ex, ex > > | HepLib::epvec_t |
| typedef pair< ex, epvec_t > | HepLib::co_epvec_t |
Functions | |
| unsigned | golden_ratio_hash (uintptr_t n) |
| exvector | HepLib::GiNaC_Parallel (int ntotal, std::function< ex(int)> f, const string &key) |
| GiNaC Parallel Evaluation using fork. | |
| std::vector< std::string > | HepLib::split (const std::string &s, char delimiter) |
| split the string into serveral part, separated by the delimiter | |
| string | HepLib::now (bool use_date) |
| date/time string | |
| lst | HepLib::gather_symbols (const ex &e) |
| get all symbols from input expression | |
| lst | HepLib::gather_symbols (const exvector &ve) |
| get all symbols from input expression | |
| string | HepLib::RunOS (const string &cmd) |
| run symtem command and return the output as string | |
| void | HepLib::garRead (const string &garfn, map< string, ex > &resMap) |
| garRead from file, and output in a map | |
| ex | HepLib::garRead (const string &garfn, const char *key) |
| garRead from file, only the element w.r.t. key | |
| ex | HepLib::garRead (const string &garfn) |
| garRead from file, only the element w.r.t. key "res", note inner check will be performed | |
| void | HepLib::garWrite (const string &garfn, const map< string, ex > &resMap) |
| garWrite to write the string-key map to the archive | |
| void | HepLib::garWrite (const string &garfn, const ex &res) |
| garWrite to write the expression to the archive, with key: "res", including a check key will be written | |
| ex | HepLib::str2ex (const string &expr, symtab stab) |
| convert string to ex expression, using Parser internally | |
| ex | HepLib::str2ex (const string &expr) |
| convert string to ex expression, using Parser internally | |
| lst | HepLib::str2lst (const string &expr, symtab stab) |
| convert string to the lst, using Parser internally | |
| lst | HepLib::str2lst (const string &expr) |
| convert string to the lst, using Parser internally | |
| string | HepLib::ex2str (const ex &expr) |
| convert ex to output string, the defalut printer format will be used | |
| string | HepLib::ex2str (const exvector &expr) |
| convert exvec to output string, the defalut printer format will be used | |
| matrix | HepLib::lst2mat (const lst &ls) |
| convert 2Dim lst to matrix | |
| string | HepLib::ex2str (const exmap &expr) |
| convert exmap to output string, the defalut printer format will be used | |
| string | HepLib::ex2str (const exset &expr) |
| convert exset to output string, the defalut printer format will be used | |
| string | HepLib::file2str (string filename) |
| read file content to string | |
| void | HepLib::str2file (const string &ostr, string filename) |
| export string to a file | |
| void | HepLib::str2file (char *buff, FILE *fh) |
| vector< string > | HepLib::file2strvec (string filename, bool skip_empty) |
| read file content to string vector | |
| ex | HepLib::file2ex (string filename) |
| read file content to ex | |
| ex | HepLib::file2ex (string filename, symtab st) |
| read file content to ex | |
| void | HepLib::ex2file (const ex &expr, string filename) |
| export expression file | |
| void | HepLib::ex2file (string filename, const ex &expr) |
| export expression file | |
| ex | HepLib::q2ex (__float128 num) |
| __float128 to ex | |
| __float128 | HepLib::ex2q (ex num) |
| ex of numeric to __float128 | |
| int | HepLib::ex2int (ex num) |
| ex to integer | |
| lst | HepLib::vec2lst (const exvector &ev) |
| convert exvector to lst | |
| exvector | HepLib::lst2vec (const lst &alst) |
| convert lst to exvector | |
| lst | HepLib::add2lst (const ex &expr) |
| convert add to lst | |
| lst | HepLib::mul2lst (const ex &expr) |
| convert mul to lst | |
| lst | HepLib::xlst (int bi, int ei) |
| return a lst: x(bi), x(bi+1), ..., x(ei) | |
| lst | HepLib::xlst (int ei) |
| return a lst: x(0), x(1), ..., x(ei) | |
| ex | HepLib::series_ex (ex const &expr_in, ex const &s0, int sn0) |
| the series like Mathematica, include s^n | |
| ex | HepLib::series_ex (ex const &expr_in, symbol const &s0, int sn0) |
| the series like Mathematica, include s^n | |
| ex | HepLib::diff_ex (ex const expr, ex const xp, unsigned nth, bool expand) |
| the differential like Mathematica | |
| co_epvec_t | HepLib::power_expand_2 (const co_epvec_t &co_epv, int n) |
| pair< ex, epvec_t > | HepLib::inner_expand_collect (ex const &expr_in, std::function< bool(const ex &)> has_func, int depth=0) |
| ex | HepLib::expand_ex (ex const &expr_in, std::function< bool(const ex &)> has_func) |
| the expand like Mathematica | |
| ex | HepLib::collect_ex (ex const &expr_in, std::function< bool(const ex &)> has_func, int opt) |
| the collect function like Mathematica | |
| lst | HepLib::collect_lst (ex const &expr_in, std::function< bool(const ex &)> has_func, int opt) |
| the collect function like Mathematica, reture the lst { {c1,v1}, {c2,v2}, ... } | |
| ex | HepLib::EvalF (ex expr) |
| the nuerical evaluation, Digits=100 will be used | |
| ex | HepLib::EvalL (ex expr) |
| ex | HepLib::EvalQ (ex expr) |
| ex | HepLib::EvalMP (ex expr) |
| ex | HepLib::NN (ex expr, int digits) |
| the nuerical evaluation | |
| bool | HepLib::xPositive (ex const expr) |
| check the expr is xPositive, i.e., each x-monomial item is postive | |
| int | HepLib::xSign (ex const expr) |
| the always sign for expr | |
| void | HepLib::let_op_append (ex &ex_in, const ex item) |
| append item into expression | |
| void | HepLib::let_op_prepend (ex &ex_in, const ex item) |
| preppend item into expression | |
| void | HepLib::let_op_remove_last (ex &ex_in) |
| remove last from expression | |
| void | HepLib::let_op_remove_first (ex &ex_in) |
| remove first from expression | |
| void | HepLib::let_op_append (ex &ex_in, int index, ex const item) |
| append item into index-th of expression | |
| void | HepLib::let_op_append (lst &ex_in, int index, ex const item) |
| append item into index-th of expression | |
| void | HepLib::let_op_append (ex &ex_in, int index1, int index2, ex const item) |
| append item into index1-th.index2-th of expression | |
| void | HepLib::let_op_append (lst &ex_in, int index1, int index2, ex const item) |
| append item into index1-th.index2-th of expression | |
| void | HepLib::let_op_prepend (ex &ex_in, int index, ex const item) |
| prepend item into index-th of expression | |
| void | HepLib::let_op_prepend (lst &ex_in, int index, ex const item) |
| prepend item into index-th of expression | |
| void | HepLib::let_op_prepend (ex &ex_in, int index1, int index2, ex const item) |
| prepend item into index1-th.index2-th of expression | |
| void | HepLib::let_op_prepend (lst &ex_in, int index1, int index2, ex const item) |
| prepend item into index1-th.index2-th of expression | |
| void | HepLib::let_op_remove_last (ex &ex_in, int index) |
| remove the last in index-th of expression | |
| void | HepLib::let_op_remove_last (lst &ex_in, int index) |
| remove the last in index-th of expression | |
| void | HepLib::let_op_remove_last (ex &ex_in, int index1, int index2) |
| remove the last in index1-th.index2-th of expression | |
| void | HepLib::let_op_remove_last (lst &ex_in, int index1, int index2) |
| remove the last in index1-th.index2-th of expression | |
| void | HepLib::let_op_remove_first (ex &ex_in, int index) |
| remove the first in index-th of expression | |
| void | HepLib::let_op_remove_first (lst &ex_in, int index) |
| remove the first in index-th of expression | |
| void | HepLib::let_op_remove_first (ex &ex_in, int index1, int index2) |
| remove the first in index1-th.index2-th of expression | |
| void | HepLib::let_op_remove_first (lst &ex_in, int index1, int index2) |
| remove the first in index1-th.index2-th of expression | |
| void | HepLib::let_op (ex &ex_in, int index1, int index2, const ex item) |
| update index1-th.index2-th of expression with item | |
| void | HepLib::let_op (lst &ex_in, int index1, int index2, const ex item) |
| update index1-th.index2-th of expression with item | |
| void | HepLib::let_op (ex &ex_in, int index1, int index2, int index3, const ex item) |
| update index1-th.index2-th.index3-th of expression with item | |
| void | HepLib::let_op (lst &ex_in, int index1, int index2, int index3, const ex item) |
| update index1-th.index2-th.index3-th of expression with item | |
| ex | HepLib::get_op (const ex ex_in, int index1, int index2) |
| return index1-th.index2-th of expression | |
| ex | HepLib::get_op (const lst ex_in, int index1, int index2) |
| return index1-th.index2-th of expression | |
| ex | HepLib::get_op (const ex ex_in, int index1, int index2, int index3) |
| return index1-th.index2-th.index3-th of expression | |
| ex | HepLib::get_op (const lst ex_in, int index1, int index2, int index3) |
| return index1-th.index2-th.index3-th of expression | |
| int | HepLib::CpuCores () |
| return the cpu cores using OpenMP | |
| ex | HepLib::normal_fermat (const ex &expr, bool dfactor) |
| return the normalizatied expression, using fermat_numer_denom | |
| ex | HepLib::collect_factors (const ex &expr) |
| a wrapper for collect_common_factors, catch errors | |
| ex | HepLib::exfactor (const ex &expr_in, int opt) |
| factorize a expression | |
| ex | HepLib::exexpand (const ex &expr, int opt) |
| factorize a expression | |
| ex | HepLib::exnormal (const ex &expr, int opt) |
| normalize a expression | |
| ex | HepLib::exnd (const ex &expr, int opt) |
| num_den a expression | |
| ex | HepLib::form_eval (const ex &expr) |
| ex | HepLib::inner_factor_form (const ex &expr) |
| ex | HepLib::factor_form (const ex &expr, bool nd) |
| factorize a expression using FORM | |
| void | HepLib::garWrite (const exvector &exv, string garfn) |
| void | HepLib::garRead (exvector &exv, string garfn) |
| ex | HepLib::add_collect_normal (const exvector &exv, ex const &pats, int opt) |
| ex | HepLib::add_collect_normal (const exvector &exv, init_list const &pats, int opt) |
| ex | HepLib::add_collect_normal (const exvector &exv, lst const &pats, int opt) |
| ex | HepLib::add_collect_normal (const ex &e, ex const &pats, int opt) |
| ex | HepLib::add_collect_normal (const ex &e, lst const &pats, int opt) |
| ex | HepLib::add_collect_normal (const ex &e, init_list const &pats, int opt) |
| bool | HepLib::has_w (const ex &e) |
| void | HepLib::subs_w (exmap &repl) |
| void | HepLib::subs_w (lst &repl) |
| void | HepLib::ReShare (const ex &e) |
| void | HepLib::ReShare (const lst &es) |
| void | HepLib::ReShare (const ex &e1, const ex &e2) |
| void | HepLib::ReShare (const ex &e1, const ex &e2, const ex &e3) |
| void | HepLib::ReShare (const exvector &ev) |
| void | HepLib::ReShare (const exvector &ev1, const exvector &ev2) |
| ex | HepLib::nextprime (const ex &n) |
| ex | HepLib::nextprime (int n) |
| ex | HepLib::Rationalize (const ex &e, int dn) |
| void | HepLib::set_precision (long prec, bool push) |
| void | HepLib::reset_precision () |
| long | HepLib::get_precision () |
| void | HepLib::arg2map (int argc, char **argv, const char *optstring, std::map< char, std::string > &kv) |
| bool | HepLib::has_symbol (const ex &e) |
Variables | |
| const char * | HepLib::ErrColor = RED |
| const char * | HepLib::WarnColor = MAGENTA |
| const char * | HepLib::Color_HighLight = WHITE |
| std::stack< cln::float_format_t > | HepLib::cln_prec_stack |
| std::stack< long > | HepLib::digits_stack |
Basic Functions, extend GiNaC, etc.
Definition in file BASIC.cpp.