Main namespace for SymEngine package. More...
Typedefs | |
typedef std::unordered_map< RCP< const Basic >, bool, RCPBasicHash, RCPBasicKeyEq > | umap_basic_bool |
typedef uint64_t | hash_t |
typedef std::unordered_map< RCP< const Basic >, RCP< const Number >, RCPBasicHash, RCPBasicKeyEq > | umap_basic_num |
typedef std::unordered_map< short, RCP< const Basic > > | umap_short_basic |
typedef std::unordered_map< int, RCP< const Basic > > | umap_int_basic |
typedef std::unordered_map< RCP< const Basic >, RCP< const Basic >, RCPBasicHash, RCPBasicKeyEq > | umap_basic_basic |
typedef std::unordered_set< RCP< const Basic >, RCPBasicHash, RCPBasicKeyEq > | uset_basic |
typedef std::vector< int > | vec_int |
typedef std::vector< RCP< const Basic > > | vec_basic |
typedef std::vector< RCP< const Integer > > | vec_integer |
typedef std::vector< unsigned int > | vec_uint |
typedef std::vector< integer_class > | vec_integer_class |
typedef std::vector< RCP< const Symbol > > | vec_sym |
typedef std::set< RCP< const Basic >, RCPBasicKeyLess > | set_basic |
typedef std::multiset< RCP< const Basic >, RCPBasicKeyLess > | multiset_basic |
typedef std::map< vec_uint, unsigned long long int > | map_vec_uint |
typedef std::map< vec_uint, integer_class > | map_vec_mpz |
typedef std::map< RCP< const Basic >, RCP< const Number >, RCPBasicKeyLess > | map_basic_num |
typedef std::map< RCP< const Basic >, RCP< const Basic >, RCPBasicKeyLess > | map_basic_basic |
typedef std::map< RCP< const Integer >, unsigned, RCPIntegerKeyLess > | map_integer_uint |
typedef std::map< unsigned, integer_class > | map_uint_mpz |
typedef std::map< unsigned, rational_class > | map_uint_mpq |
typedef std::map< int, Expression > | map_int_Expr |
typedef std::unordered_map< RCP< const Basic >, unsigned int, RCPBasicHash, RCPBasicKeyEq > | umap_basic_uint |
typedef std::vector< std::pair< RCP< const Basic >, RCP< const Basic > > > | vec_pair |
typedef std::unordered_map< vec_uint, integer_class, vec_hash< vec_uint > > | umap_uvec_mpz |
typedef std::unordered_map< vec_int, integer_class, vec_hash< vec_int > > | umap_vec_mpz |
typedef std::unordered_map< vec_int, Expression, vec_hash< vec_int > > | umap_vec_expr |
template<bool B, class T = void> | |
using | enable_if_t = typename std::enable_if< B, T >::type |
typedef std::function< double(const Basic &)> | fn |
typedef TwoArgBasic< Function > | TwoArgFunction |
using | CodeGenOptLevel = llvm::CodeGenOpt::Level |
typedef std::set< RCP< const Boolean >, RCPBasicKeyLess > | set_boolean |
typedef std::vector< RCP< const Boolean > > | vec_boolean |
typedef std::vector< std::pair< RCP< const Basic >, RCP< const Boolean > > > | PiecewiseVec |
typedef std::vector< std::pair< int, int > > | permutelist |
typedef boost::multiprecision::number< boost::multiprecision::cpp_int_backend<>, boost::multiprecision::et_off > | integer_class |
typedef boost::multiprecision::number< boost::multiprecision::cpp_rational_backend, boost::multiprecision::et_off > | rational_class |
typedef std::set< RCP< const Set >, RCPBasicKeyLess > | set_set |
Enumerations | |
enum | TypeID { TypeID_Count } |
enum class | EvalfDomain { Complex = 0 , Real = 1 , Symbolic = 2 } |
enum class | PrecedenceEnum { Relational , Add , Mul , Pow , Atom } |
enum class | tribool { indeterminate = -1 , trifalse = 0 , tritrue = 1 } |
Functions | |
RCP< const Basic > | add (const RCP< const Basic > &a, const RCP< const Basic > &b) |
Adds two objects (safely). More... | |
RCP< const Basic > | add (const vec_basic &a) |
Sums the elements of a vector. More... | |
RCP< const Basic > | sub (const RCP< const Basic > &a, const RCP< const Basic > &b) |
Substracts b from a . More... | |
void | pow_number (const RCP< const Basic > &in_re, const RCP< const Basic > &in_im, unsigned long n, Ptr< RCP< const Basic >> &out_re, Ptr< RCP< const Basic >> &out_im) |
void | as_real_imag (const RCP< const Basic > &x, const Ptr< RCP< const Basic >> &real, const Ptr< RCP< const Basic >> &imag) |
bool | eq (const Basic &a, const Basic &b) |
Checks equality for a and b More... | |
bool | neq (const Basic &a, const Basic &b) |
Checks inequality for a and b More... | |
template<class T > | |
bool | is_a (const Basic &b) |
Templatised version to check is_a type. More... | |
template<class T > | |
bool | is_a_sub (const Basic &b) |
bool | is_same_type (const Basic &a, const Basic &b) |
Returns true if a and b are exactly the same type T . | |
std::ostream & | operator<< (std::ostream &out, const SymEngine::Basic &p) |
<< Operator More... | |
template<typename 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. | |
template<typename T > | |
void | hash_combine_impl (hash_t &seed, const T &v, typename std::enable_if< std::is_integral< T >::value >::type *=nullptr) |
void | hash_combine_impl (hash_t &seed, const std::string &s) |
void | hash_combine_impl (hash_t &seed, const double &s) |
template<class T > | |
void | hash_combine (hash_t &seed, const T &v) |
template<typename T > | |
std::string | to_string (const T &value) |
workaround for MinGW bug | |
std::string | type_code_name (TypeID id) |
const char * | get_version () |
bool | is_a_Atom (const Basic &b) |
Returns true if b is an atom. i.e. b.get_args returns an empty vector. | |
RCP< const Basic > | expand (const RCP< const Basic > &self, bool deep=true) |
Expands self | |
void | as_numer_denom (const RCP< const Basic > &x, const Ptr< RCP< const Basic >> &numer, const Ptr< RCP< const Basic >> &denom) |
RCP< const Basic > | rewrite_as_exp (const RCP< const Basic > &x) |
RCP< const Basic > | rewrite_as_sin (const RCP< const Basic > &x) |
RCP< const Basic > | rewrite_as_cos (const RCP< const Basic > &x) |
void | cse (vec_pair &replacements, vec_basic &reduced_exprs, const vec_basic &exprs) |
RCP< const Number > | pow_number (const Complex &x, unsigned long n) |
bool | is_a_Complex (const Basic &b) |
RCP< const ComplexDouble > | complex_double (std::complex< double > x) |
RCP< const ComplexDouble > | complex_double (double real, double imag) |
RCP< const Constant > | constant (const std::string &name) |
inline version to return Constant | |
umap_basic_basic | opt_cse (const vec_basic &exprs) |
void | tree_cse (vec_pair &replacements, vec_basic &reduced_exprs, const vec_basic &exprs, umap_basic_basic &opt_subs) |
std::vector< unsigned > | set_diff (const std::set< unsigned > &a, const std::vector< unsigned > &b) |
void | add_to_sorted_vec (std::vector< unsigned > &vec, unsigned number) |
void | match_common_args (const std::string &func_class, const vec_basic &funcs_, umap_basic_basic &opt_subs) |
vec_basic | set_as_vec (const set_basic &s) |
template<typename T > | |
bool | is_aligned (T *p, size_t n=alignof(T)) |
static std::string | _str (const Basic &a) |
void | jacobian (const DenseMatrix &A, const DenseMatrix &x, DenseMatrix &result, bool diff_cache) |
void | sjacobian (const DenseMatrix &A, const DenseMatrix &x, DenseMatrix &result, bool diff_cache) |
void | diff (const DenseMatrix &A, const RCP< const Symbol > &x, DenseMatrix &result, bool diff_cache) |
void | sdiff (const DenseMatrix &A, const RCP< const Basic > &x, DenseMatrix &result, bool diff_cache) |
void | conjugate_dense (const DenseMatrix &A, DenseMatrix &B) |
void | transpose_dense (const DenseMatrix &A, DenseMatrix &B) |
void | conjugate_transpose_dense (const DenseMatrix &A, DenseMatrix &B) |
void | submatrix_dense (const DenseMatrix &A, DenseMatrix &B, unsigned row_start, unsigned col_start, unsigned row_end, unsigned col_end, unsigned row_step, unsigned col_step) |
void | add_dense_dense (const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) |
void | add_dense_scalar (const DenseMatrix &A, const RCP< const Basic > &k, DenseMatrix &B) |
void | mul_dense_dense (const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) |
void | elementwise_mul_dense_dense (const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) |
void | mul_dense_scalar (const DenseMatrix &A, const RCP< const Basic > &k, DenseMatrix &B) |
void | row_exchange_dense (DenseMatrix &A, unsigned i, unsigned j) |
void | row_mul_scalar_dense (DenseMatrix &A, unsigned i, RCP< const Basic > &c) |
void | row_add_row_dense (DenseMatrix &A, unsigned i, unsigned j, RCP< const Basic > &c) |
void | permuteFwd (DenseMatrix &A, permutelist &pl) |
void | column_exchange_dense (DenseMatrix &A, unsigned i, unsigned j) |
void | pivoted_gaussian_elimination (const DenseMatrix &A, DenseMatrix &B, permutelist &pl) |
void | fraction_free_gaussian_elimination (const DenseMatrix &A, DenseMatrix &B) |
void | pivoted_fraction_free_gaussian_elimination (const DenseMatrix &A, DenseMatrix &B, permutelist &pl) |
void | pivoted_gauss_jordan_elimination (const DenseMatrix &A, DenseMatrix &B, permutelist &pl) |
void | fraction_free_gauss_jordan_elimination (const DenseMatrix &A, DenseMatrix &B) |
void | pivoted_fraction_free_gauss_jordan_elimination (const DenseMatrix &A, DenseMatrix &B, permutelist &pl) |
unsigned | pivot (DenseMatrix &B, unsigned r, unsigned c) |
void | reduced_row_echelon_form (const DenseMatrix &A, DenseMatrix &b, vec_uint &pivot_cols, bool normalize_last) |
void | diagonal_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | back_substitution (const DenseMatrix &U, const DenseMatrix &b, DenseMatrix &x) |
void | forward_substitution (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | fraction_free_gaussian_elimination_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | fraction_free_gauss_jordan_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x, bool pivot) |
void | fraction_free_LU_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | LU_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | pivoted_LU_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | LDL_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) |
void | fraction_free_LU (const DenseMatrix &A, DenseMatrix &LU) |
void | LU (const DenseMatrix &A, DenseMatrix &L, DenseMatrix &U) |
void | pivoted_LU (const DenseMatrix &A, DenseMatrix &LU, permutelist &pl) |
void | pivoted_LU (const DenseMatrix &A, DenseMatrix &L, DenseMatrix &U, permutelist &pl) |
void | fraction_free_LDU (const DenseMatrix &A, DenseMatrix &L, DenseMatrix &D, DenseMatrix &U) |
void | QR (const DenseMatrix &A, DenseMatrix &Q, DenseMatrix &R) |
void | LDL (const DenseMatrix &A, DenseMatrix &L, DenseMatrix &D) |
void | cholesky (const DenseMatrix &A, DenseMatrix &L) |
bool | is_symmetric_dense (const DenseMatrix &A) |
RCP< const Basic > | det_bareis (const DenseMatrix &A) |
void | berkowitz (const DenseMatrix &A, std::vector< DenseMatrix > &polys) |
RCP< const Basic > | det_berkowitz (const DenseMatrix &A) |
void | char_poly (const DenseMatrix &A, DenseMatrix &B) |
void | inverse_fraction_free_LU (const DenseMatrix &A, DenseMatrix &B) |
void | inverse_LU (const DenseMatrix &A, DenseMatrix &B) |
void | inverse_pivoted_LU (const DenseMatrix &A, DenseMatrix &B) |
void | inverse_gauss_jordan (const DenseMatrix &A, DenseMatrix &B) |
void | dot (const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) |
void | cross (const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) |
RCP< const Set > | eigen_values (const DenseMatrix &A) |
void | eye (DenseMatrix &A, int k) |
void | diag (DenseMatrix &A, vec_basic &v, int k) |
void | ones (DenseMatrix &A) |
void | zeros (DenseMatrix &A) |
template<typename T > | |
static RCP< const Basic > | fdiff (const T &self, RCP< const Symbol > x, DiffVisitor &visitor) |
static bool | fdiff (const Ptr< RCP< const Basic >> &ret, const Zeta &self, unsigned index) |
static bool | fdiff (const Ptr< RCP< const Basic >> &ret, const UpperGamma &self, unsigned index) |
static bool | fdiff (const Ptr< RCP< const Basic >> &ret, const LowerGamma &self, unsigned index) |
static bool | fdiff (const Ptr< RCP< const Basic >> &ret, const PolyGamma &self, unsigned index) |
static bool | fdiff (const Ptr< RCP< const Basic >> &ret, const Function &self, unsigned index) |
template<typename P > | |
static RCP< const Basic > | diff_upolyflint (const P &self, const Symbol &x) |
template<typename Poly , typename Dict > | |
static RCP< const Basic > | diff_upoly (const Poly &self, const Symbol &x) |
template<typename Container , typename Poly > | |
static RCP< const Basic > | diff_mpoly (const MSymEnginePoly< Container, Poly > &self, const RCP< const Symbol > &x) |
static RCP< const Symbol > | get_dummy (const Basic &b, std::string name) |
RCP< const Basic > | diff (const RCP< const Basic > &arg, const RCP< const Symbol > &x, bool cache=true) |
Differentiation w.r.t symbols. | |
RCP< const Basic > | sdiff (const RCP< const Basic > &arg, const RCP< const Basic > &x, bool cache) |
SymPy style differentiation for non-symbol variables. More... | |
std::ostream & | operator<< (std::ostream &out, const SymEngine::umap_basic_num &d) |
print functions | |
std::ostream & | operator<< (std::ostream &out, const SymEngine::map_basic_num &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::map_basic_basic &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::umap_basic_basic &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::vec_basic &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::set_basic &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::map_int_Expr &d) |
std::ostream & | operator<< (std::ostream &out, const SymEngine::vec_pair &d) |
bool | vec_basic_eq_perm (const vec_basic &a, const vec_basic &b) |
misc functions | |
template<typename T1 , typename T2 , typename T3 > | |
void | insert (T1 &m, const T2 &first, const T3 &second) |
template<class M , typename C = std::less<typename M::key_type>> | |
std::vector< typename M::key_type > | sorted_keys (const M &d) |
template<typename T , typename U > | |
bool | unified_eq (const std::pair< T, U > &a, const std::pair< T, U > &b) |
template<typename T , typename U > | |
bool | unified_eq (const std::set< T, U > &a, const std::set< T, U > &b) |
template<typename T , typename U > | |
bool | unified_eq (const std::multiset< T, U > &a, const std::multiset< T, U > &b) |
template<typename K , typename V , typename C > | |
bool | unified_eq (const std::map< K, V, C > &a, const std::map< K, V, C > &b) |
template<typename K , typename V , typename H , typename E > | |
bool | unified_eq (const std::unordered_map< K, V, H, E > &a, const std::unordered_map< K, V, H, E > &b) |
template<typename T , typename U , typename = enable_if_t<std::is_base_of<Basic, T>::value and std::is_base_of<Basic, U>::value>> | |
bool | unified_eq (const RCP< const T > &a, const RCP< const U > &b) |
template<typename T , typename = enable_if_t<std::is_arithmetic<T>::value or std::is_same<T, integer_class>::value>> | |
bool | unified_eq (const T &a, const T &b) |
template<class T > | |
bool | unordered_eq (const T &a, const T &b) |
template<class T > | |
bool | ordered_eq (const T &A, const T &B) |
template<typename T > | |
bool | unified_eq (const std::vector< T > &a, const std::vector< T > &b) |
template<typename T , typename = enable_if_t<std::is_arithmetic<T>::value or std::is_same<T, integer_class>::value or std::is_same<T, rational_class>::value>> | |
int | unified_compare (const T &a, const T &b) |
template<typename T , typename U , typename = enable_if_t<std::is_base_of<Basic, T>::value and std::is_base_of<Basic, U>::value>> | |
int | unified_compare (const RCP< const T > &a, const RCP< const U > &b) |
template<class T > | |
int | ordered_compare (const T &A, const T &B) |
template<typename T > | |
int | unified_compare (const std::vector< T > &a, const std::vector< T > &b) |
template<typename T , typename U > | |
int | unified_compare (const std::set< T, U > &a, const std::set< T, U > &b) |
template<typename T , typename U > | |
int | unified_compare (const std::multiset< T, U > &a, const std::multiset< T, U > &b) |
template<typename T , typename U > | |
int | unified_compare (const std::pair< T, U > &a, const std::pair< T, U > &b) |
template<typename K , typename V , typename C > | |
int | unified_compare (const std::map< K, V, C > &a, const std::map< K, V, C > &b) |
template<typename K , typename V , typename H , typename E > | |
int | unified_compare (const std::unordered_map< K, V, H, E > &a, const std::unordered_map< K, V, H, E > &b) |
template<class M , typename C = std::less<typename M::key_type>> | |
int | unordered_compare (const M &a, const M &b) |
bool | order (const DenseMatrix &t, const std::vector< DenseMatrix > &basis, unsigned k) |
bool | is_minimum (const DenseMatrix &t, const std::vector< DenseMatrix > &basis, unsigned n) |
void | homogeneous_lde (std::vector< DenseMatrix > &basis, const DenseMatrix &A) |
RCP< const Number > | evalf_numeric (const Basic &b, unsigned long bits, bool real) |
RCP< const Basic > | evalf (const Basic &b, unsigned long bits, EvalfDomain domain) |
static std::vector< fn > | init_eval_double () |
double | eval_double (const Basic &b) |
std::complex< double > | eval_complex_double (const Basic &b) |
double | eval_double_single_dispatch (const Basic &b) |
double | eval_double_visitor_pattern (const Basic &b) |
RCP< const Number > | _mulnum (const RCP< const Number > &x, const RCP< const Number > &y) |
void | _imulnum (const Ptr< RCP< const Number >> &self, const RCP< const Number > &other) |
Expression | pow (const Expression &base, const Expression &exp) |
Expression | expand (const Expression &arg) |
bool | unified_eq (const Expression &a, const Expression &b) |
int | unified_compare (const Expression &a, const Expression &b) |
RCP< const GaloisField > | gf_poly (RCP< const Basic > i, GaloisFieldDict &&dict) |
RCP< const GaloisField > | gf_poly (RCP< const Basic > i, map_uint_mpz &&dict, integer_class modulo_) |
RCP< const GaloisField > | pow_upoly (const GaloisField &a, unsigned int p) |
vec_basic | generate_fdiff_weights_vector (const vec_basic &grid, const unsigned max_deriv, const RCP< const Basic > around) |
RCP< const Basic > | sqrt (RCP< const Basic > &arg) |
RCP< const Basic > | cbrt (RCP< const Basic > &arg) |
static const RCP< const Basic > * | sin_table () |
static const umap_basic_basic & | inverse_cst () |
static const umap_basic_basic & | inverse_tct () |
RCP< const Basic > | conjugate (const RCP< const Basic > &arg) |
Canonicalize Conjugate. | |
bool | get_pi_shift (const RCP< const Basic > &arg, const Ptr< RCP< const Number >> &n, const Ptr< RCP< const Basic >> &x) |
bool | trig_has_basic_shift (const RCP< const Basic > &arg) |
bool | could_extract_minus (const Basic &arg) |
bool | handle_minus (const RCP< const Basic > &arg, const Ptr< RCP< const Basic >> &rarg) |
bool | trig_simplify (const RCP< const Basic > &arg, unsigned period, bool odd, bool conj_odd, const Ptr< RCP< const Basic >> &rarg, int &index, int &sign) |
bool | inverse_lookup (const umap_basic_basic &d, const RCP< const Basic > &t, const Ptr< RCP< const Basic >> &index) |
RCP< const Basic > | sign (const RCP< const Basic > &arg) |
Canonicalize Sign. | |
RCP< const Basic > | floor (const RCP< const Basic > &arg) |
Canonicalize Floor: | |
RCP< const Basic > | ceiling (const RCP< const Basic > &arg) |
Canonicalize Ceiling: | |
RCP< const Basic > | truncate (const RCP< const Basic > &arg) |
Canonicalize Truncate: | |
RCP< const Basic > | sin (const RCP< const Basic > &arg) |
Canonicalize Sin: | |
RCP< const Basic > | cos (const RCP< const Basic > &arg) |
Canonicalize Cos: | |
RCP< const Basic > | tan (const RCP< const Basic > &arg) |
Canonicalize Tan: | |
RCP< const Basic > | cot (const RCP< const Basic > &arg) |
Canonicalize Cot: | |
RCP< const Basic > | csc (const RCP< const Basic > &arg) |
Canonicalize Csc: | |
RCP< const Basic > | sec (const RCP< const Basic > &arg) |
Canonicalize Sec: | |
RCP< const Basic > | trig_to_sqrt (const RCP< const Basic > &arg) |
RCP< const Basic > | asin (const RCP< const Basic > &arg) |
Canonicalize ASin: | |
RCP< const Basic > | acos (const RCP< const Basic > &arg) |
Canonicalize ACos: | |
RCP< const Basic > | asec (const RCP< const Basic > &arg) |
Canonicalize ASec: | |
RCP< const Basic > | acsc (const RCP< const Basic > &arg) |
Canonicalize ACsc: | |
RCP< const Basic > | atan (const RCP< const Basic > &arg) |
Canonicalize ATan: | |
RCP< const Basic > | acot (const RCP< const Basic > &arg) |
Canonicalize ACot: | |
RCP< const Basic > | atan2 (const RCP< const Basic > &num, const RCP< const Basic > &den) |
Canonicalize ATan2: | |
RCP< const Basic > | log (const RCP< const Basic > &arg) |
Returns the Natural Logarithm from argument arg | |
RCP< const Basic > | log (const RCP< const Basic > &arg, const RCP< const Basic > &base) |
RCP< const Basic > | lambertw (const RCP< const Basic > &arg) |
Create a new LambertW instance: | |
RCP< const Basic > | function_symbol (std::string name, const vec_basic &arg) |
RCP< const Basic > | function_symbol (std::string name, const RCP< const Basic > &arg) |
Create a new FunctionSymbol instance: | |
RCP< const Basic > | sinh (const RCP< const Basic > &arg) |
Canonicalize Sinh: | |
RCP< const Basic > | csch (const RCP< const Basic > &arg) |
Canonicalize Csch: | |
RCP< const Basic > | cosh (const RCP< const Basic > &arg) |
Canonicalize Cosh: | |
RCP< const Basic > | sech (const RCP< const Basic > &arg) |
Canonicalize Sech: | |
RCP< const Basic > | tanh (const RCP< const Basic > &arg) |
Canonicalize Tanh: | |
RCP< const Basic > | coth (const RCP< const Basic > &arg) |
Canonicalize Coth: | |
RCP< const Basic > | asinh (const RCP< const Basic > &arg) |
Canonicalize ASinh: | |
RCP< const Basic > | acsch (const RCP< const Basic > &arg) |
Canonicalize ACsch: | |
RCP< const Basic > | acosh (const RCP< const Basic > &arg) |
Canonicalize ACosh: | |
RCP< const Basic > | atanh (const RCP< const Basic > &arg) |
Canonicalize ATanh: | |
RCP< const Basic > | acoth (const RCP< const Basic > &arg) |
Canonicalize ACoth: | |
RCP< const Basic > | asech (const RCP< const Basic > &arg) |
Canonicalize ASech: | |
RCP< const Basic > | kronecker_delta (const RCP< const Basic > &i, const RCP< const Basic > &j) |
Canonicalize KroneckerDelta: | |
bool | has_dup (const vec_basic &arg) |
RCP< const Basic > | eval_levicivita (const vec_basic &arg, int len) |
RCP< const Basic > | levi_civita (const vec_basic &arg) |
Canonicalize LeviCivita: | |
RCP< const Basic > | zeta (const RCP< const Basic > &s, const RCP< const Basic > &a) |
Create a new Zeta instance: | |
RCP< const Basic > | zeta (const RCP< const Basic > &s) |
RCP< const Basic > | dirichlet_eta (const RCP< const Basic > &s) |
Create a new Dirichlet_eta instance: | |
RCP< const Basic > | erf (const RCP< const Basic > &arg) |
Canonicalize Erf: | |
RCP< const Basic > | erfc (const RCP< const Basic > &arg) |
Canonicalize Erfc: | |
RCP< const Basic > | gamma_positive_int (const RCP< const Basic > &arg) |
RCP< const Basic > | gamma_multiple_2 (const RCP< const Basic > &arg) |
RCP< const Basic > | gamma (const RCP< const Basic > &arg) |
Canonicalize Gamma: | |
RCP< const Basic > | lowergamma (const RCP< const Basic > &s, const RCP< const Basic > &x) |
Canonicalize LowerGamma: | |
RCP< const Basic > | uppergamma (const RCP< const Basic > &s, const RCP< const Basic > &x) |
Canonicalize UpperGamma: | |
RCP< const Basic > | loggamma (const RCP< const Basic > &arg) |
Canonicalize LogGamma: | |
RCP< const Basic > | beta (const RCP< const Basic > &x, const RCP< const Basic > &y) |
Canonicalize Beta: | |
RCP< const Basic > | polygamma (const RCP< const Basic > &n, const RCP< const Basic > &x) |
Canonicalize PolyGamma. | |
RCP< const Basic > | digamma (const RCP< const Basic > &x) |
RCP< const Basic > | trigamma (const RCP< const Basic > &x) |
RCP< const Basic > | abs (const RCP< const Basic > &arg) |
Canonicalize Abs: | |
RCP< const Basic > | max (const vec_basic &arg) |
Canonicalize Max: | |
RCP< const Basic > | min (const vec_basic &arg) |
Canonicalize Min: | |
RCP< const Basic > | unevaluated_expr (const RCP< const Basic > &arg) |
RCP< const Basic > | sqrt (const RCP< const Basic > &arg) |
RCP< const Basic > | cbrt (const RCP< const Basic > &arg) |
RCP< const Infty > | infty (const RCP< const Number > &direction) |
RCP< const Infty > | infty (int n=1) |
RCP< const Integer > | isqrt (const Integer &n) |
Integer Square root. | |
RCP< const Integer > | iabs (const Integer &n) |
Integer Absolute value. | |
int | i_nth_root (const Ptr< RCP< const Integer >> &r, const Integer &a, unsigned long int n) |
Integer nth root. | |
bool | perfect_square (const Integer &n) |
Perfect Square. | |
bool | perfect_power (const Integer &n) |
Perfect Square. | |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, RCP< const Integer > >::type | integer (T i) |
RCP< const Integer > | integer (integer_class i) |
llvm::Function * | get_float_intrinsic (llvm::Type *type, llvm::Intrinsic::ID id, unsigned n, llvm::Module *mod) |
RCP< const Boolean > | contains (const RCP< const Basic > &expr, const RCP< const Set > &set) |
RCP< const Basic > | piecewise (const PiecewiseVec &vec) |
const vec_boolean | get_vec_from_set (const set_boolean &s) |
template<typename caller > | |
RCP< const Boolean > | and_or (const set_boolean &s, const bool &op_x_notx) |
RCP< const Boolean > | logical_not (const RCP< const Boolean > &s) |
RCP< const Boolean > | logical_xor (const vec_boolean &s) |
RCP< const Boolean > | Eq (const RCP< const Basic > &lhs) |
Returns the canonicalized Equality object from a single argument. | |
RCP< const Boolean > | Eq (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Returns the canonicalized Equality object from the two arguments. | |
RCP< const Boolean > | Ne (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Returns the canonicalized Unequality object from the arguments. | |
RCP< const Boolean > | Le (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Returns the canonicalized LessThan object from the arguments. | |
RCP< const Boolean > | Ge (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Convenience function returning LessThan object. | |
RCP< const Boolean > | Lt (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Returns the canonicalized StrictLessThan object from the arguments. | |
RCP< const Boolean > | Gt (const RCP< const Basic > &lhs, const RCP< const Basic > &rhs) |
Convenience function returning StrictLessThan object. | |
RCP< const Boolean > | logical_and (const set_boolean &s) |
RCP< const Boolean > | logical_nand (const set_boolean &s) |
RCP< const Boolean > | logical_or (const set_boolean &s) |
RCP< const Boolean > | logical_nor (const set_boolean &s) |
RCP< const Boolean > | logical_xnor (const vec_boolean &s) |
RCP< const BooleanAtom > | boolean (bool b) |
bool | is_a_Relational (const Basic &b) |
bool | is_a_Boolean (const Basic &b) |
RCP< const MatrixExpr > | conjugate_matrix (const RCP< const MatrixExpr > &arg) |
bool | is_zero_vec (const vec_basic &container) |
bool | is_identity_vec (const vec_basic &container) |
RCP< const MatrixExpr > | diagonal_matrix (const vec_basic &container) |
void | check_matching_sizes (const vec_basic &vec) |
RCP< const MatrixExpr > | hadamard_product (const vec_basic &factors) |
RCP< const MatrixExpr > | identity_matrix (const RCP< const Basic > &n) |
bool | is_identity_dense (size_t n, const vec_basic &container) |
bool | is_diagonal_dense (size_t n, const vec_basic &container) |
vec_basic | extract_diagonal (size_t n, const vec_basic &container) |
RCP< const MatrixExpr > | immutable_dense_matrix (size_t m, size_t n, const vec_basic &container) |
tribool | is_diagonal (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_lower (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_real (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_square (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_symmetric (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_toeplitz (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_upper (const MatrixExpr &m, const Assumptions *assumptions) |
tribool | is_zero (const MatrixExpr &m, const Assumptions *assumptions) |
RCP< const MatrixExpr > | matrix_add (const vec_basic &terms) |
bool | is_a_MatrixExpr (const Basic &b) |
RCP< const DiagonalMatrix > | mul_diag_diag (const DiagonalMatrix &A, const DiagonalMatrix &B) |
RCP< const ImmutableDenseMatrix > | mul_dense_dense (const ImmutableDenseMatrix &A, const ImmutableDenseMatrix &B) |
RCP< const ImmutableDenseMatrix > | mul_diag_dense (const DiagonalMatrix &A, const ImmutableDenseMatrix &B) |
RCP< const ImmutableDenseMatrix > | mul_dense_diag (const ImmutableDenseMatrix &A, const DiagonalMatrix &B) |
void | check_matching_mul_sizes (const vec_basic &vec) |
RCP< const MatrixExpr > | matrix_mul (const vec_basic &factors) |
RCP< const MatrixExpr > | matrix_symbol (const std::string &name) |
std::pair< RCP< const Basic >, RCP< const Basic > > | size (const MatrixExpr &m) |
RCP< const Basic > | trace (const RCP< const MatrixExpr > &arg) |
RCP< const MatrixExpr > | transpose (const RCP< const MatrixExpr > &arg) |
RCP< const MatrixExpr > | zero_matrix (const RCP< const Basic > &m, const RCP< const Basic > &n) |
template<class T > | |
bool | is_a (const MatrixBase &b) |
bool | operator== (const SymEngine::MatrixBase &lhs, const SymEngine::MatrixBase &rhs) |
bool | operator!= (const SymEngine::MatrixBase &lhs, const SymEngine::MatrixBase &rhs) |
void | monomial_mul (const vec_int &A, const vec_int &B, vec_int &C) |
Monomial multiplication. | |
integer_class | pow (const integer_class &a, unsigned long b) |
void | mp_fdiv_qr (integer_class &q, integer_class &r, const integer_class &a, const integer_class &b) |
void | mp_cdiv_qr (integer_class &q, integer_class &r, const integer_class &a, const integer_class &b) |
void | mp_gcdext (integer_class &gcd, integer_class &s, integer_class &t, const integer_class &a, const integer_class &b) |
bool | mp_invert (integer_class &res, const integer_class &a, const integer_class &m) |
integer_class | fmod (const integer_class &a, const integer_class &mod) |
void | mp_pow_ui (rational_class &res, const rational_class &i, unsigned long n) |
void | mp_powm (integer_class &res, const integer_class &base, const integer_class &exp, const integer_class &m) |
integer_class | step (const unsigned long &n, const integer_class &i, integer_class &x) |
bool | positive_root (integer_class &res, const integer_class &i, const unsigned long n) |
bool | mp_root (integer_class &res, const integer_class &i, const unsigned long n) |
integer_class | mp_sqrt (const integer_class &i) |
void | mp_rootrem (integer_class &a, integer_class &b, const integer_class &i, unsigned long n) |
void | mp_sqrtrem (integer_class &a, integer_class &b, const integer_class &i) |
int | mp_probab_prime_p (const integer_class &i, unsigned retries) |
void | mp_nextprime (integer_class &res, const integer_class &i) |
unsigned long | mp_scan1 (const integer_class &i) |
two_by_two_matrix | fib_matrix (unsigned long n) |
void | mp_fib_ui (integer_class &res, unsigned long n) |
void | mp_fib2_ui (integer_class &a, integer_class &b, unsigned long n) |
two_by_two_matrix | luc_matrix (unsigned long n) |
void | mp_lucnum_ui (integer_class &res, unsigned long n) |
void | mp_lucnum2_ui (integer_class &a, integer_class &b, unsigned long n) |
void | mp_fac_ui (integer_class &res, unsigned long n) |
void | mp_bin_ui (integer_class &res, const integer_class &n, unsigned long r) |
bool | mp_perfect_power_p (const integer_class &i) |
bool | mp_perfect_square_p (const integer_class &i) |
integer_class | mp_primorial (unsigned long n) |
int | mp_legendre (const integer_class &a, const integer_class &n) |
int | unchecked_jacobi (const integer_class &a, const integer_class &n) |
int | mp_jacobi (const integer_class &a, const integer_class &n) |
int | mp_kronecker (const integer_class &a, const integer_class &n) |
integer_class | operator""_z (const char *str) |
Literal for creating multiple precision integers. | |
rational_class | operator""_q (const char *str) |
integer_class | mp_abs (const integer_class &i) |
int | mp_sign (const integer_class &i) |
double | mp_get_d (const integer_class &i) |
void | mp_set_d (integer_class &i, double a) |
void | mp_set_str (integer_class &i, const std::string &a) |
std::string | mp_get_hex_str (const integer_class &i) |
void | mp_demote (integer_class &i) |
bool | mp_fits_ulong_p (const integer_class &i) |
bool | mp_fits_slong_p (const integer_class &i) |
unsigned long | mp_get_ui (const integer_class &i) |
long | mp_get_si (const integer_class &i) |
mpz_srcptr | get_mpz_t (const integer_class &i) |
mpz_ptr | get_mpz_t (integer_class &i) |
void | mp_pow_ui (integer_class &res, const integer_class &i, unsigned long n) |
void | mp_gcd (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_and (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_fdiv_r (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_fdiv_q (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_cdiv_q (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_tdiv_q (integer_class &res, const integer_class &a, const integer_class &b) |
void | mp_divexact (integer_class &q, const integer_class &a, const integer_class &b) |
void | mp_lcm (integer_class &q, const integer_class &a, const integer_class &b) |
void | mp_tdiv_qr (integer_class &q, integer_class &r, const integer_class &a, const integer_class &b) |
void | mp_addmul (integer_class &r, const integer_class &a, const integer_class &b) |
const integer_class & | get_den (const rational_class &i) |
const integer_class & | get_num (const rational_class &i) |
integer_class & | get_den (rational_class &i) |
integer_class & | get_num (rational_class &i) |
mpq_srcptr | get_mpq_t (const rational_class &i) |
void | canonicalize (rational_class &i) |
double | mp_get_d (const rational_class &i) |
int | mp_sign (const rational_class &i) |
rational_class | mp_abs (const rational_class &i) |
bool | mp_divisible_p (const integer_class &a, const integer_class &b) |
void | mp_urandomm (integer_class &a, gmp_randstate_t &t, const integer_class &b) |
auto | get_mp_t (const integer_class &x) -> decltype(get_mpz_t(x)) |
auto | get_mp_t (const rational_class &x) -> decltype(get_mpq_t(x)) |
int | mp_cmpabs (const integer_class &a, const integer_class &b) |
std::ostream & | operator<< (std::ostream &os, const fmpz_wrapper &f) |
std::ostream & | operator<< (std::ostream &os, const fmpq_wrapper &f) |
RCP< const Basic > | mul (const RCP< const Basic > &a, const RCP< const Basic > &b) |
Multiplication. | |
RCP< const Basic > | mul (const vec_basic &a) |
RCP< const Basic > | div (const RCP< const Basic > &a, const RCP< const Basic > &b) |
Division. | |
RCP< const Basic > | neg (const RCP< const Basic > &a) |
Negation. | |
RCP< const Integer > | gcd (const Integer &a, const Integer &b) |
Greatest Common Divisor. | |
void | gcd_ext (const Ptr< RCP< const Integer >> &g, const Ptr< RCP< const Integer >> &s, const Ptr< RCP< const Integer >> &t, const Integer &a, const Integer &b) |
Extended GCD. | |
RCP< const Integer > | lcm (const Integer &a, const Integer &b) |
Least Common Multiple. | |
int | mod_inverse (const Ptr< RCP< const Integer >> &b, const Integer &a, const Integer &m) |
inverse modulo | |
RCP< const Integer > | mod (const Integer &n, const Integer &d) |
modulo round toward zero | |
RCP< const Integer > | quotient (const Integer &n, const Integer &d) |
void | quotient_mod (const Ptr< RCP< const Integer >> &q, const Ptr< RCP< const Integer >> &r, const Integer &n, const Integer &d) |
RCP< const Integer > | mod_f (const Integer &n, const Integer &d) |
modulo round toward -inf | |
RCP< const Integer > | quotient_f (const Integer &n, const Integer &d) |
void | quotient_mod_f (const Ptr< RCP< const Integer >> &q, const Ptr< RCP< const Integer >> &r, const Integer &n, const Integer &d) |
RCP< const Integer > | fibonacci (unsigned long n) |
Fibonacci number. | |
void | fibonacci2 (const Ptr< RCP< const Integer >> &g, const Ptr< RCP< const Integer >> &s, unsigned long n) |
Fibonacci n and n-1. | |
RCP< const Integer > | lucas (unsigned long n) |
Lucas number. | |
void | lucas2 (const Ptr< RCP< const Integer >> &g, const Ptr< RCP< const Integer >> &s, unsigned long n) |
Lucas number n and n-1. | |
RCP< const Integer > | binomial (const Integer &n, unsigned long k) |
Binomial Coefficient. | |
RCP< const Integer > | factorial (unsigned long n) |
Factorial. | |
bool | divides (const Integer &a, const Integer &b) |
int | probab_prime_p (const Integer &a, unsigned reps=25) |
Probabilistic Prime. | |
RCP< const Integer > | nextprime (const Integer &a) |
int | factor_lehman_method (const Ptr< RCP< const Integer >> &f, const Integer &n) |
Factor using lehman's methods. | |
int | factor_pollard_pm1_method (const Ptr< RCP< const Integer >> &f, const Integer &n, unsigned B=10, unsigned retries=5) |
Factor using Pollard's p-1 method. | |
int | factor_pollard_rho_method (const Ptr< RCP< const Integer >> &f, const Integer &n, unsigned retries=5) |
Factor using Pollard's rho methods. | |
int | factor (const Ptr< RCP< const Integer >> &f, const Integer &n, double B1) |
int | factor_trial_division (const Ptr< RCP< const Integer >> &f, const Integer &n) |
void | prime_factors (std::vector< RCP< const Integer >> &primes, const Integer &n) |
Find prime factors of n | |
void | prime_factor_multiplicities (map_integer_uint &primes, const Integer &n) |
Find multiplicities of prime factors of n | |
RCP< const Number > | bernoulli (unsigned long n) |
RCP< const Number > | harmonic (unsigned long n, long m=1) |
Computes the sum of the inverses of the first perfect mth powers. | |
bool | crt (const Ptr< RCP< const Integer >> &R, const std::vector< RCP< const Integer >> &rem, const std::vector< RCP< const Integer >> &mod) |
Chinese remainder function. Return true when a solution exists. | |
bool | primitive_root (const Ptr< RCP< const Integer >> &g, const Integer &n) |
Computes a primitive root. Returns false if no primitive root exists. | |
void | primitive_root_list (std::vector< RCP< const Integer >> &roots, const Integer &n) |
RCP< const Integer > | totient (const RCP< const Integer > &n) |
Euler's totient function. | |
RCP< const Integer > | carmichael (const RCP< const Integer > &n) |
Carmichael function. | |
bool | multiplicative_order (const Ptr< RCP< const Integer >> &o, const RCP< const Integer > &a, const RCP< const Integer > &n) |
Multiplicative order. Return false if order does not exist. | |
int | legendre (const Integer &a, const Integer &n) |
Legendre Function. | |
int | jacobi (const Integer &a, const Integer &n) |
Jacobi Function. | |
int | kronecker (const Integer &a, const Integer &n) |
Kronecker Function. | |
bool | _is_nthroot_mod_prime_power (const integer_class &a, const integer_class &n, const integer_class &p, const unsigned k) |
bool | nthroot_mod (const Ptr< RCP< const Integer >> &root, const RCP< const Integer > &a, const RCP< const Integer > &n, const RCP< const Integer > &m) |
A solution to x**n == a mod m. Return false if none exists. | |
void | nthroot_mod_list (std::vector< RCP< const Integer >> &roots, const RCP< const Integer > &a, const RCP< const Integer > &n, const RCP< const Integer > &m) |
All Solutions to x**n == a mod m. Return false if none exists. | |
bool | powermod (const Ptr< RCP< const Integer >> &powm, const RCP< const Integer > &a, const RCP< const Number > &b, const RCP< const Integer > &m) |
void | powermod_list (std::vector< RCP< const Integer >> &pows, const RCP< const Integer > &a, const RCP< const Number > &b, const RCP< const Integer > &m) |
vec_integer_class | quadratic_residues (const Integer &a) |
Finds all Quadratic Residues of a Positive Integer. | |
bool | is_quad_residue (const Integer &a, const Integer &p) |
Returns true if 'a' is a quadratic residue of 'p'. | |
bool | is_nth_residue (const Integer &a, const Integer &n, const Integer &mod) |
Returns true if 'a' is a nth power residue of 'mod'. | |
int | mobius (const Integer &a) |
Mobius Function. | |
long | mertens (const unsigned long a) |
integer_class | mp_polygonal_number (const integer_class &s, const integer_class &n) |
Numeric calculation of the n:th s-gonal number. More... | |
integer_class | mp_principal_polygonal_root (const integer_class &s, const integer_class &x) |
Numeric calculation of the principal s-gonal root of x. More... | |
std::pair< integer_class, integer_class > | mp_perfect_power_decomposition (const integer_class &n, bool lowest_exponent=false) |
Decompose a positive integer into perfect powers. More... | |
RCP< const Basic > | primepi (const RCP< const Basic > &arg) |
RCP< const Basic > | primorial (const RCP< const Basic > &arg) |
RCP< const Basic > | polygonal_number (const RCP< const Basic > &s, const RCP< const Basic > &n) |
The n:th s-gonal number. More... | |
RCP< const Basic > | principal_polygonal_root (const RCP< const Basic > &s, const RCP< const Basic > &x) |
The principal s-gonal root of x. More... | |
RCP< const Number > | addnum (const RCP< const Number > &self, const RCP< const Number > &other) |
Add self and other | |
RCP< const Number > | subnum (const RCP< const Number > &self, const RCP< const Number > &other) |
Subtract self and other | |
RCP< const Number > | mulnum (const RCP< const Number > &self, const RCP< const Number > &other) |
Multiply self and other | |
RCP< const Number > | divnum (const RCP< const Number > &self, const RCP< const Number > &other) |
Divide self and other | |
RCP< const Number > | pownum (const RCP< const Number > &self, const RCP< const Number > &other) |
Raise self to power other | |
void | iaddnum (const Ptr< RCP< const Number >> &self, const RCP< const Number > &other) |
void | imulnum (const Ptr< RCP< const Number >> &self, const RCP< const Number > &other) |
void | idivnum (const Ptr< RCP< const Number >> &self, const RCP< const Number > &other) |
bool | is_a_Number (const Basic &b) |
bool | is_number_and_zero (const Basic &b) |
tribool | is_zero (const Basic &b, const Assumptions *assumptions=nullptr) |
Check if a number is zero. More... | |
tribool | is_nonzero (const Basic &b, const Assumptions *assumptions=nullptr) |
Check if a number is non-zero. More... | |
tribool | is_positive (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_nonpositive (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_negative (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_nonnegative (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_integer (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_real (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_complex (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_rational (const Basic &b) |
tribool | is_irrational (const Basic &b) |
tribool | is_finite (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_infinite (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_even (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_odd (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_algebraic (const Basic &b, const Assumptions *assumptions=nullptr) |
tribool | is_transcendental (const Basic &b, const Assumptions *assumptions=nullptr) |
RCP< const Basic > | parse (const std::string &s, bool convert_xor=true, const std::map< const std::string, const RCP< const Basic >> &constants={}) |
RCP< const Basic > | parse_old (const std::string &s, bool convert_xor=true) |
RCP< const Basic > | parse_sbml (const std::string &s, const std::map< const std::string, const RCP< const Basic >> &constants={}) |
umap_basic_num | _find_gens_poly_pow (const RCP< const Basic > &x, const RCP< const Basic > &base) |
umap_basic_num | _find_gens_poly (const RCP< const Basic > &x) |
template<typename P > | |
RCP< const P > | from_basic (const RCP< const Basic > &basic, const RCP< const Basic > &gen, bool ex=false) |
template<typename P > | |
enable_if_t< is_a_UPoly< P >::value, RCP< const P > > | from_basic (const RCP< const Basic > &basic, bool ex=false) |
template<typename T , typename P > | |
enable_if_t< std::is_same< T, UExprDict >::value, T > | _basic_to_upoly (const RCP< const Basic > &basic, const RCP< const Basic > &gen) |
template<typename T , typename P > | |
enable_if_t< std::is_base_of< UIntPolyBase< T, P >, P >::value, T > | _basic_to_upoly (const RCP< const Basic > &basic, const RCP< const Basic > &gen) |
template<typename T , typename P > | |
enable_if_t< std::is_base_of< URatPolyBase< T, P >, P >::value, T > | _basic_to_upoly (const RCP< const Basic > &basic, const RCP< const Basic > &gen) |
template<typename P > | |
enable_if_t< std::is_same< MIntPoly, P >::value, typename P::container_type > | _basic_to_mpoly (const RCP< const Basic > &basic, const set_basic &gens) |
template<typename P > | |
enable_if_t< std::is_same< MExprPoly, P >::value, typename P::container_type > | _basic_to_mpoly (const RCP< const Basic > &basic, const set_basic &gens) |
template<typename P > | |
RCP< const P > | from_basic (const RCP< const Basic > &basic, set_basic &gens, bool ex=false) |
template<typename P > | |
enable_if_t< std::is_base_of< MSymEnginePoly< typename P::container_type, P >, P >::value, RCP< const P > > | from_basic (const RCP< const Basic > &basic, bool ex=false) |
template<typename Poly > | |
void | cancel (const RCP< const Basic > &numer, const RCP< const Basic > &denom, const Ptr< RCP< const Poly >> &result_numer, const Ptr< RCP< const Poly >> &result_denom, const Ptr< RCP< const Poly >> &common) |
unsigned int | reconcile (vec_uint &v1, vec_uint &v2, set_basic &s, const set_basic &s1, const set_basic &s2) |
template<typename Poly , typename Container > | |
set_basic | get_translated_container (Container &x, Container &y, const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | add_mpoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | sub_mpoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | mul_mpoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | neg_mpoly (const Poly &a) |
template<typename Poly > | |
RCP< const Poly > | pow_mpoly (const Poly &a, unsigned int n) |
RCP< const UExprPoly > | uexpr_poly (RCP< const Basic > i, UExprDict &&dict) |
RCP< const UExprPoly > | uexpr_poly (RCP< const Basic > i, map_int_Expr &&dict) |
bool | divides_upoly (const UIntPoly &a, const UIntPoly &b, const Ptr< RCP< const UIntPoly >> &out) |
template<typename T > | |
unsigned int | bit_length (T t) |
integer_class | to_mp_class (const integer_class &i) |
rational_class | to_mp_class (const rational_class &i) |
template<typename Poly > | |
RCP< const Poly > | add_upoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | neg_upoly (const Poly &a) |
template<typename Poly > | |
RCP< const Poly > | sub_upoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | mul_upoly (const Poly &a, const Poly &b) |
template<typename Poly > | |
RCP< const Poly > | quo_upoly (const Poly &a, const Poly &b) |
bool | divides_upoly (const URatPoly &a, const URatPoly &b, const Ptr< RCP< const URatPoly >> &out) |
template<typename Container , template< typename X, typename Y > class BaseType, typename Poly > | |
RCP< const Poly > | pow_upoly (const USymEnginePoly< Container, BaseType, Poly > &a, unsigned int p) |
RCP< const Basic > | pow (const RCP< const Basic > &a, const RCP< const Basic > &b) |
void | multinomial_coefficients (unsigned m, unsigned n, map_vec_uint &r) |
void | multinomial_coefficients_mpz (unsigned m, unsigned n, map_vec_mpz &r) |
RCP< const Basic > | exp (const RCP< const Basic > &x) |
Returns the natural exponential function E**x = pow(E, x) | |
RCP< const Basic > | pow_expand (const RCP< const Pow > &self) |
Expand the power expression. | |
static std::vector< unsigned > & | sieve_primes () |
std::string | ccode (const Basic &x) |
std::string | jscode (const Basic &x) |
std::string | c89code (const Basic &x) |
std::string | c99code (const Basic &x) |
std::string | latex (const Basic &x) |
void | print_rational_class (const rational_class &r, std::ostringstream &s) |
std::string | latex (const DenseMatrix &m, const unsigned max_rows, const unsigned max_cols) |
std::vector< std::string > | init_latex_printer_names () |
std::vector< std::string > | init_mathml_printer_names () |
std::string | mathml (const Basic &x) |
static std::vector< std::string > | init_sbml_printer_names () |
std::string | sbml (const Basic &x) |
std::string | ascii_art () |
std::string | print_double (double d) |
template<typename T > | |
char | _print_sign (const T &i) |
template<typename P > | |
std::string | upoly_print (const P &x) |
std::vector< std::string > | init_str_printer_names () |
std::string | str (const Basic &x) |
std::string | str (const DenseMatrix &x) |
std::string | julia_str (const Basic &x) |
static std::vector< std::string > | init_unicode_printer_names () |
static std::vector< size_t > | init_unicode_printer_lengths (const std::vector< std::string > &names) |
std::string | unicode (const Basic &x) |
void | get_num_den (const Rational &rat, const Ptr< RCP< const Integer >> &num, const Ptr< RCP< const Integer >> &den) |
returns the num and den of rational rat as RCP<const Integer> | |
RCP< const Number > | rational (long n, long d) |
convenience creator from two longs | |
RCP< const RealDouble > | real_double (double x) |
RCP< const Number > | number (std::complex< double > x) |
RCP< const Number > | number (double x) |
RCP< const Basic > | refine (const RCP< const Basic > &x, const Assumptions *assumptions) |
void | expr2poly (const RCP< const Basic > &p, umap_basic_num &syms, umap_vec_mpz &P) |
Converts expression p into a polynomial P , with symbols sym | |
void | poly_mul (const umap_vec_mpz &A, const umap_vec_mpz &B, umap_vec_mpz &C) |
Multiply two polynomials: C = A*B | |
template<class Archive > | |
void | save_basic (Archive &ar, const Basic &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Symbol &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Mul &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Add &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Pow &b) |
template<typename Archive > | |
void | save_helper (Archive &ar, const integer_class &intgr) |
template<typename Archive > | |
void | save_helper (Archive &ar, const rational_class &rat) |
template<typename Archive > | |
void | save_basic (Archive &ar, const URatPoly &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Integer &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const RealDouble &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Rational &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const ComplexBase &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Interval &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const BooleanAtom &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Infty &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const NaN &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Constant &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const OneArgFunction &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const TwoArgFunction &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Relational &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const And &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Or &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Xor &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Not &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Contains &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Piecewise &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Reals &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Rationals &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const EmptySet &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Integers &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const UniversalSet &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Union &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Complement &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const ImageSet &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const FiniteSet &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const ConditionSet &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const GaloisField &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const SeriesCoeffInterface &) |
template<class Archive > | |
void | save_basic (Archive &ar, const MultiArgFunction &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const FunctionSymbol &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Derivative &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const Subs &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const NumberWrapper &b) |
template<class Archive > | |
void | save_basic (Archive &ar, const FunctionWrapper &b) |
template<class Archive > | |
void | save_basic (Archive &ar, RCP< const Basic > const &ptr) |
template<class Archive , class T > | |
void | CEREAL_SAVE_FUNCTION_NAME (Archive &ar, RCP< const T > const &ptr) |
Saving for SymEngine::RCP. | |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const RealDouble > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Infty > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const NaN > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Symbol > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Mul > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Add > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Pow > &) |
template<typename Archive > | |
void | load_helper (Archive &ar, integer_class &intgr) |
template<typename Archive > | |
void | load_helper (Archive &ar, const rational_class &rat) |
template<typename Archive > | |
RCP< const Basic > | load_basic (Archive &ar, const URatPoly &b) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Integer > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Constant > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Rational > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Complex > &) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< std::is_base_of< ComplexBase, T >::value, int >::type *=nullptr) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Interval > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const BooleanAtom > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const And > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Or > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Xor > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Not > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Piecewise > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Contains > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Reals > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Rationals > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const EmptySet > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Integers > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const UniversalSet > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Union > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Complement > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const ImageSet > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const FiniteSet > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const ConditionSet > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Derivative > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const Subs > &) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< std::is_base_of< OneArgFunction, T >::value, int >::type *=nullptr) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< std::is_base_of< TwoArgFunction, T >::value, int >::type *=nullptr) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const FunctionSymbol > &) |
template<class Archive > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const FunctionWrapper > &) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< std::is_base_of< MultiArgFunction, T >::value, int >::type *=nullptr) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< std::is_base_of< Relational, T >::value, int >::type *=nullptr) |
template<class Archive , class T > | |
RCP< const Basic > | load_basic (Archive &ar, RCP< const T > &, typename std::enable_if< not(std::is_base_of< Relational, T >::value or std::is_base_of< ComplexBase, T >::value or std::is_base_of< OneArgFunction, T >::value or std::is_base_of< MultiArgFunction, T >::value or std::is_base_of< TwoArgFunction, T >::value), int >::type *=nullptr) |
template<class Archive > | |
void | save_typeid (Archive &ar, TypeID &t) |
template<class Archive > | |
void | load_typeid (Archive &ar, TypeID &t) |
template<class Archive , class T > | |
void | CEREAL_LOAD_FUNCTION_NAME (Archive &ar, RCP< const T > &ptr) |
Loading for SymEngine::RCP. | |
bool | needs_symbolic_constants (const RCP< const Basic > &ex, const RCP< const Symbol > &var) |
RCP< const SeriesCoeffInterface > | series (const RCP< const Basic > &ex, const RCP< const Symbol > &var, unsigned int prec) |
RCP< const SeriesCoeffInterface > | series_invfunc (const RCP< const Basic > &ex, const RCP< const Symbol > &var, unsigned int prec) |
RCP< const UnivariateSeries > | univariate_series (RCP< const Symbol > i, unsigned int prec, const UExprDict &s) |
RCP< const Basic > | sup (const Set &s) |
RCP< const Basic > | inf (const Set &s) |
RCP< const Set > | boundary (const Set &s) |
RCP< const Set > | interior (const Set &s) |
RCP< const Set > | closure (const Set &s) |
static RCP< const Set > | make_set_union (const set_set &in) |
static RCP< const Set > | make_set_intersection (const set_set &in) |
RCP< const Set > | set_union (const set_set &in) |
RCP< const Set > | set_intersection (const set_set &in) |
RCP< const Set > | set_complement_helper (const RCP< const Set > &container, const RCP< const Set > &universe) |
RCP< const Set > | set_complement (const RCP< const Set > &universe, const RCP< const Set > &container) |
RCP< const Set > | conditionset (const RCP< const Basic > &sym, const RCP< const Boolean > &condition) |
bool | is_a_Set (const Basic &b) |
RCP< const Complexes > | complexes () |
RCP< const Reals > | reals () |
RCP< const Rationals > | rationals () |
RCP< const Integers > | integers () |
RCP< const Naturals > | naturals () |
RCP< const Naturals0 > | naturals0 () |
RCP< const EmptySet > | emptyset () |
RCP< const UniversalSet > | universalset () |
RCP< const Set > | finiteset (const set_basic &container) |
RCP< const Set > | interval (const RCP< const Number > &start, const RCP< const Number > &end, const bool left_open=false, const bool right_open=false) |
RCP< const Set > | imageset (const RCP< const Basic > &sym, const RCP< const Basic > &expr, const RCP< const Set > &base) |
RCP< const Basic > | simplify (const RCP< const Basic > &x, const Assumptions *assumptions) |
RCP< const Set > | solve_poly_linear (const vec_basic &coeffs, const RCP< const Set > &domain) |
RCP< const Set > | solve_poly_quadratic (const vec_basic &coeffs, const RCP< const Set > &domain) |
RCP< const Set > | solve_poly_cubic (const vec_basic &coeffs, const RCP< const Set > &domain) |
RCP< const Set > | solve_poly_quartic (const vec_basic &coeffs, const RCP< const Set > &domain) |
RCP< const Set > | solve_poly_heuristics (const vec_basic &coeffs, const RCP< const Set > &domain) |
RCP< const Basic > | get_coeff_basic (const integer_class &i) |
RCP< const Basic > | get_coeff_basic (const Expression &i) |
template<typename Poly > | |
vec_basic | extract_coeffs (const RCP< const Poly > &f) |
RCP< const Set > | solve_poly (const RCP< const Basic > &f, const RCP< const Symbol > &sym, const RCP< const Set > &domain) |
RCP< const Set > | solve_rational (const RCP< const Basic > &f, const RCP< const Symbol > &sym, const RCP< const Set > &domain) |
bool | is_a_LinearArgTrigEquation (const Basic &b, const Symbol &x) |
RCP< const Set > | invertComplex (const RCP< const Basic > &fX, const RCP< const Set > &gY, const RCP< const Symbol > &sym, const RCP< const Dummy > &nD, const RCP< const Set > &domain) |
RCP< const Set > | solve_trig (const RCP< const Basic > &f, const RCP< const Symbol > &sym, const RCP< const Set > &domain) |
RCP< const Set > | solve (const RCP< const Basic > &f, const RCP< const Symbol > &sym, const RCP< const Set > &domain) |
vec_basic | linsolve_helper (const DenseMatrix &A, const DenseMatrix &b) |
vec_basic | linsolve (const DenseMatrix &system, const vec_sym &syms) |
vec_basic | linsolve (const vec_basic &system, const vec_sym &syms) |
set_basic | get_set_from_vec (const vec_sym &syms) |
std::pair< DenseMatrix, DenseMatrix > | linear_eqns_to_matrix (const vec_basic &equations, const vec_sym &syms) |
void | csr_matmat_pass1 (const CSRMatrix &A, const CSRMatrix &B, CSRMatrix &C) |
void | csr_matmat_pass2 (const CSRMatrix &A, const CSRMatrix &B, CSRMatrix &C) |
void | csr_diagonal (const CSRMatrix &A, DenseMatrix &D) |
void | csr_scale_rows (CSRMatrix &A, const DenseMatrix &X) |
void | csr_scale_columns (CSRMatrix &A, const DenseMatrix &X) |
void | csr_binop_csr_canonical (const CSRMatrix &A, const CSRMatrix &B, CSRMatrix &C, RCP< const Basic >(&bin_op)(const RCP< const Basic > &, const RCP< const Basic > &)) |
RCP< const Basic > | xreplace (const RCP< const Basic > &x, const map_basic_basic &subs_dict, bool cache) |
Mappings in the subs_dict are applied to the expression tree of x | |
RCP< const Basic > | subs (const RCP< const Basic > &x, const map_basic_basic &subs_dict, bool cache=true) |
RCP< const Basic > | msubs (const RCP< const Basic > &x, const map_basic_basic &subs_dict, bool cache) |
Subs which treat f(t) and Derivative(f(t), t) as separate variables. | |
RCP< const Basic > | ssubs (const RCP< const Basic > &x, const map_basic_basic &subs_dict, bool cache) |
SymPy compatible subs. | |
RCP< const Symbol > | symbol (const std::string &name) |
inline version to return Symbol | |
RCP< const Dummy > | dummy () |
inline version to return Dummy | |
RCP< const Dummy > | dummy (const std::string &name) |
template<typename To , typename From > | |
To | implicit_cast (const From &f) |
template<typename To , typename From > | |
To | down_cast (From *f) |
template<typename To , typename From > | |
To | down_cast (From &f) |
template<typename To , typename From > | |
To | numeric_cast (From f, typename std::enable_if<(std::is_signed< From >::value &&std::is_signed< To >::value)||(std::is_unsigned< From >::value &&std::is_unsigned< To >::value)>::type *=nullptr) |
template<typename To , typename From > | |
To | numeric_cast (From f, typename std::enable_if<(std::is_signed< From >::value &&std::is_unsigned< To >::value)>::type *=nullptr) |
template<typename To , typename From > | |
To | numeric_cast (From f, typename std::enable_if<(std::is_unsigned< From >::value &&std::is_signed< To >::value)>::type *=nullptr) |
template<typename T , typename... Args> | |
RCP< T > | make_rcp (Args &&...args) |
bool | is_polynomial (const Basic &b, const set_basic &variables={}) |
Check if expression is a polynomial. More... | |
bool | is_true (tribool x) |
bool | is_false (tribool x) |
bool | is_indeterminate (tribool x) |
tribool | tribool_from_bool (bool x) |
tribool | and_tribool (tribool a, tribool b) |
tribool | or_tribool (tribool a, tribool b) |
tribool | not_tribool (tribool a) |
tribool | andwk_tribool (tribool a, tribool b) |
tribool | orwk_tribool (tribool a, tribool b) |
RCP< const Basic > | tuple (const vec_basic &arg) |
void | preorder_traversal (const Basic &b, Visitor &v) |
void | postorder_traversal (const Basic &b, Visitor &v) |
void | preorder_traversal_stop (const Basic &b, StopVisitor &v) |
void | postorder_traversal_stop (const Basic &b, StopVisitor &v) |
bool | has_symbol (const Basic &b, const Basic &x) |
RCP< const Basic > | coeff (const Basic &b, const Basic &x, const Basic &n) |
set_basic | free_symbols (const MatrixBase &m) |
set_basic | free_symbols (const Basic &b) |
set_basic | function_symbols (const Basic &b) |
void | preorder_traversal_local_stop (const Basic &b, LocalStopVisitor &v) |
unsigned | count_ops (const vec_basic &a) |
template<typename... Args> | |
set_basic | atoms (const Basic &b) |
Variables | |
static struct SymEngine::ConstantInitializer | constantInitializer |
static int | nifty_counter |
static storage_for< RCP< const Integer > > | zero_buf |
RCP< const Integer > & | zero = reinterpret_cast<RCP<const Integer > &>( zero_buf) |
static storage_for< RCP< const Integer > > | one_buf |
RCP< const Integer > & | one = reinterpret_cast<RCP<const Integer > &>( one_buf) |
static storage_for< RCP< const Integer > > | minus_one_buf |
RCP< const Integer > & | minus_one = reinterpret_cast<RCP<const Integer > &>( minus_one_buf) |
static storage_for< RCP< const Integer > > | two_buf |
RCP< const Integer > & | two = reinterpret_cast<RCP<const Integer > &>( two_buf) |
static storage_for< RCP< const Number > > | I_buf |
RCP< const Number > & | I = reinterpret_cast<RCP<const Number > &>( I_buf) |
static storage_for< RCP< const Constant > > | pi_buf |
RCP< const Constant > & | pi = reinterpret_cast<RCP<const Constant > &>( pi_buf) |
static storage_for< RCP< const Constant > > | E_buf |
RCP< const Constant > & | E = reinterpret_cast<RCP<const Constant > &>( E_buf) |
static storage_for< RCP< const Constant > > | EulerGamma_buf |
RCP< const Constant > & | EulerGamma = reinterpret_cast<RCP<const Constant > &>( EulerGamma_buf) |
static storage_for< RCP< const Constant > > | Catalan_buf |
RCP< const Constant > & | Catalan = reinterpret_cast<RCP<const Constant > &>( Catalan_buf) |
static storage_for< RCP< const Constant > > | GoldenRatio_buf |
RCP< const Constant > & | GoldenRatio = reinterpret_cast<RCP<const Constant > &>( GoldenRatio_buf) |
static storage_for< RCP< const Infty > > | Inf_buf |
RCP< const Infty > & | Inf = reinterpret_cast<RCP<const Infty > &>( Inf_buf) |
static storage_for< RCP< const Infty > > | NegInf_buf |
RCP< const Infty > & | NegInf = reinterpret_cast<RCP<const Infty > &>( NegInf_buf) |
static storage_for< RCP< const Infty > > | ComplexInf_buf |
RCP< const Infty > & | ComplexInf = reinterpret_cast<RCP<const Infty > &>( ComplexInf_buf) |
static storage_for< RCP< const NaN > > | Nan_buf |
RCP< const NaN > & | Nan = reinterpret_cast<RCP<const NaN > &>( Nan_buf) |
static storage_for< RCP< const Basic > > | i2_buf |
RCP< const Basic > & | i2 = reinterpret_cast<RCP<const Basic > &>( i2_buf) |
static storage_for< RCP< const Basic > > | i3_buf |
RCP< const Basic > & | i3 = reinterpret_cast<RCP<const Basic > &>( i3_buf) |
static storage_for< RCP< const Basic > > | i5_buf |
RCP< const Basic > & | i5 = reinterpret_cast<RCP<const Basic > &>( i5_buf) |
static storage_for< RCP< const Basic > > | im2_buf |
RCP< const Basic > & | im2 = reinterpret_cast<RCP<const Basic > &>( im2_buf) |
static storage_for< RCP< const Basic > > | im3_buf |
RCP< const Basic > & | im3 = reinterpret_cast<RCP<const Basic > &>( im3_buf) |
static storage_for< RCP< const Basic > > | im5_buf |
RCP< const Basic > & | im5 = reinterpret_cast<RCP<const Basic > &>( im5_buf) |
static storage_for< RCP< const Basic > > | sq3_buf |
RCP< const Basic > & | sq3 = reinterpret_cast<RCP<const Basic > &>( sq3_buf) |
static storage_for< RCP< const Basic > > | sq2_buf |
RCP< const Basic > & | sq2 = reinterpret_cast<RCP<const Basic > &>( sq2_buf) |
static storage_for< RCP< const Basic > > | sq5_buf |
RCP< const Basic > & | sq5 = reinterpret_cast<RCP<const Basic > &>( sq5_buf) |
static storage_for< RCP< const Basic > > | C0_buf |
RCP< const Basic > & | C0 = reinterpret_cast<RCP<const Basic > &>( C0_buf) |
static storage_for< RCP< const Basic > > | C1_buf |
RCP< const Basic > & | C1 = reinterpret_cast<RCP<const Basic > &>( C1_buf) |
static storage_for< RCP< const Basic > > | C2_buf |
RCP< const Basic > & | C2 = reinterpret_cast<RCP<const Basic > &>( C2_buf) |
static storage_for< RCP< const Basic > > | C3_buf |
RCP< const Basic > & | C3 = reinterpret_cast<RCP<const Basic > &>( C3_buf) |
static storage_for< RCP< const Basic > > | C4_buf |
RCP< const Basic > & | C4 = reinterpret_cast<RCP<const Basic > &>( C4_buf) |
static storage_for< RCP< const Basic > > | C5_buf |
RCP< const Basic > & | C5 = reinterpret_cast<RCP<const Basic > &>( C5_buf) |
static storage_for< RCP< const Basic > > | C6_buf |
RCP< const Basic > & | C6 = reinterpret_cast<RCP<const Basic > &>( C6_buf) |
static storage_for< RCP< const Basic > > | mC0_buf |
RCP< const Basic > & | mC0 = reinterpret_cast<RCP<const Basic > &>( mC0_buf) |
static storage_for< RCP< const Basic > > | mC1_buf |
RCP< const Basic > & | mC1 = reinterpret_cast<RCP<const Basic > &>( mC1_buf) |
static storage_for< RCP< const Basic > > | mC2_buf |
RCP< const Basic > & | mC2 = reinterpret_cast<RCP<const Basic > &>( mC2_buf) |
static storage_for< RCP< const Basic > > | mC3_buf |
RCP< const Basic > & | mC3 = reinterpret_cast<RCP<const Basic > &>( mC3_buf) |
static storage_for< RCP< const Basic > > | mC4_buf |
RCP< const Basic > & | mC4 = reinterpret_cast<RCP<const Basic > &>( mC4_buf) |
static storage_for< RCP< const Basic > > | mC5_buf |
RCP< const Basic > & | mC5 = reinterpret_cast<RCP<const Basic > &>( mC5_buf) |
static storage_for< RCP< const Basic > > | mC6_buf |
RCP< const Basic > & | mC6 = reinterpret_cast<RCP<const Basic > &>( mC6_buf) |
static storage_for< RCP< const BooleanAtom > > | boolTrue_buf |
RCP< const BooleanAtom > & | boolTrue = reinterpret_cast<RCP<const BooleanAtom > &>( boolTrue_buf) |
static storage_for< RCP< const BooleanAtom > > | boolFalse_buf |
RCP< const BooleanAtom > & | boolFalse = reinterpret_cast<RCP<const BooleanAtom > &>( boolFalse_buf) |
Main namespace for SymEngine package.
enum SymEngine::TypeID |
Adds two objects (safely).
This implementation is slower than the methods of Add
, however it is conceptually simpler and also safer, as it is more general and can perform canonicalization.
Note that:
a+b
in its most aproriate form. Definition at line 425 of file add.cpp.
RCP< const Number > SymEngine::bernoulli | ( | unsigned long | n | ) |
Computes the Bernoulli number Bn as an exact fraction, for an isolated integer n
Definition at line 496 of file ntheory.cpp.
cbrt
of the arg
x
Definition at line 66 of file pow.h.
|
inline |
RCP< const Set > SymEngine::conditionset | ( | const RCP< const Basic > & | sym, |
const RCP< const Boolean > & | condition | ||
) |
Definition at line 1781 of file sets.cpp.
bool SymEngine::could_extract_minus | ( | const Basic & | arg | ) |
true
if arg
contains a negative sign. Definition at line 325 of file functions.cpp.
b
divides a
Definition at line 162 of file ntheory.cpp.
|
inline |
Factorization
B1 | is only used when n is factored using gmp-ecm |
Definition at line 371 of file ntheory.cpp.
Factor using trial division.
Definition at line 422 of file ntheory.cpp.
bool SymEngine::get_pi_shift | ( | const RCP< const Basic > & | arg, |
const Ptr< RCP< const Number >> & | n, | ||
const Ptr< RCP< const Basic >> & | m | ||
) |
true
if arg
is of form m + n*pi
where n
is a rational Definition at line 203 of file functions.cpp.
|
inline |
Standard hash_combine()
function. Example of usage:
hash_t seed1 = 0; hash_combine<std::string>(seed1, "x"); hash_combine<std::string>(seed1, "y");
You can use it with any SymEngine class:
RCP<const Symbol> x = symbol("x"); RCP<const Symbol> y = symbol("y"); hash_t seed2 = 0; hash_combine<Basic>(seed2, *x); hash_combine<Basic>(seed2, *y);
Definition at line 95 of file basic-inl.h.
|
inline |
insert(m, first, second)
is equivalent to m[first] = second
, just faster, because no default constructor is called on the second
type.
|
inline |
|
inline |
|
inline |
|
inline |
bool SymEngine::inverse_lookup | ( | const umap_basic_basic & | d, |
const RCP< const Basic > & | t, | ||
const Ptr< RCP< const Basic >> & | index | ||
) |
returns true
if the given argument t
is found in the lookup table d
. It also returns the value in index
Definition at line 480 of file functions.cpp.
|
inline |
Templatised version to check is_a type.
Returns true if b
is exactly of type T
. Example: is_a<Symbol>(b)
: true if "b" is of type Symbol
Definition at line 36 of file basic-inl.h.
|
inline |
|
inline |
|
inline |
Returns true if b
is of type T or any of its subclasses. Example:
is_a_sub<Symbol>(b) // true if `b` is of type `Symbol` or any Symbol's
subclass
Definition at line 42 of file basic-inl.h.
tribool SymEngine::is_nonzero | ( | const Basic & | b, |
const Assumptions * | assumptions = nullptr |
||
) |
Check if a number is non-zero.
b | Basic |
assumptions | Assumptions |
Check if b is non-zero. If b is not numeric an exception will be thrown.
Definition at line 88 of file test_visitors.cpp.
|
inline |
Check if expression is a polynomial.
Check if b is a polynomial in variables. If no variables are specified all free symbols in b are considered to be variables. All symbols that are not variables will be considered to be constants.
Definition at line 812 of file test_visitors.cpp.
tribool SymEngine::is_zero | ( | const Basic & | b, |
const Assumptions * | assumptions = nullptr |
||
) |
Check if a number is zero.
b | Basic |
assumptions | Assumptions |
Check if b is zero. If b is not numeric an exception will be thrown.
Definition at line 82 of file test_visitors.cpp.
std::pair< integer_class, integer_class > SymEngine::mp_perfect_power_decomposition | ( | const integer_class & | n, |
bool | lowest_exponent = false |
||
) |
Decompose a positive integer into perfect powers.
n | Integer to decompose |
lowest_exponent | Can be set to find the perfect power with the lowest exponent. Default is to find the highest exponent. |
See https://en.wikipedia.org/wiki/Perfect_power
Definition at line 1677 of file ntheory.cpp.
integer_class SymEngine::mp_polygonal_number | ( | const integer_class & | s, |
const integer_class & | n | ||
) |
Numeric calculation of the n:th s-gonal number.
s | Number of sides of the polygon. Must be greater than 2. |
n | Must be greater than 0 |
A fast pure numeric calculation of the n:th s-gonal number. No bounds checking of the input is performed. See https://en.wikipedia.org/wiki/Polygonal_number for source of formula.
Definition at line 1649 of file ntheory.cpp.
integer_class SymEngine::mp_principal_polygonal_root | ( | const integer_class & | s, |
const integer_class & | x | ||
) |
Numeric calculation of the principal s-gonal root of x.
s | Number of sides of the polygon. Must be greater than 2. |
x | An integer greater than 0 |
A fast pure numeric calculation of the principal (i.e. positive) s-gonal root of x. No bounds checking of the input is performed. See https://en.wikipedia.org/wiki/Polygonal_number for source of formula.
Definition at line 1666 of file ntheory.cpp.
|
inline |
|
inline |
Checks inequality for a
and b
a
not equal b
Definition at line 29 of file basic-inl.h.
a
Definition at line 173 of file ntheory.cpp.
|
inline |
<<
Operator
This <<
overloaded function simply calls p.__str__
, so it allows any Basic type to be printed.
This prints using: std::cout << *x;
Definition at line 53 of file basic-inl.h.
RCP< const Basic > SymEngine::polygonal_number | ( | const RCP< const Basic > & | s, |
const RCP< const Basic > & | n | ||
) |
The n:th s-gonal number.
n:th s-gonal number
s | Number of sides of the polygon. Must be greater than 2 |
n | Must be greater than 0 |
Symbolic calculation of the n:th s-gonal number.
s | Number of sides of the polygon. Must be greater than 2. |
n | Must be greater than 0 |
Symbolic calculation of the n:th s-gonal number. Sources: https://en.wikipedia.org/wiki/Polygonal_number https://reference.wolfram.com/language/ref/PolygonalNumber.html
Definition at line 110 of file ntheory_funcs.cpp.
a
and b
Definition at line 92 of file pow.cpp.
bool SymEngine::powermod | ( | const Ptr< RCP< const Integer >> & | powm, |
const RCP< const Integer > & | a, | ||
const RCP< const Number > & | b, | ||
const RCP< const Integer > & | m | ||
) |
A solution to x**s == a**r mod m where b = r / s. Return false if none exists.
Definition at line 1434 of file ntheory.cpp.
void SymEngine::powermod_list | ( | std::vector< RCP< const Integer >> & | pows, |
const RCP< const Integer > & | a, | ||
const RCP< const Number > & | b, | ||
const RCP< const Integer > & | m | ||
) |
All solutions to x**s == a**r mod m where b = r / s. Return false if none exists.
Definition at line 1469 of file ntheory.cpp.
void SymEngine::primitive_root_list | ( | std::vector< RCP< const Integer >> & | roots, |
const Integer & | n | ||
) |
Computes all primitive roots less than n. Returns false if no primitive root exists.
Definition at line 765 of file ntheory.cpp.
RCP< const Basic > SymEngine::principal_polygonal_root | ( | const RCP< const Basic > & | s, |
const RCP< const Basic > & | x | ||
) |
The principal s-gonal root of x.
Principal s-gonal root of x.
s | Number of sides of the polygon. Must be greater than 2 |
n | Must be greater than 0 |
Symbolic calculation of the principal (i.e. positive) s-gonal root of x.
s | Number of sides of the polygon. Must be greater than 2. |
x | An integer greater than 0 |
Symbolic calculation of the principal (i.e. positive) s-gonal root of x. References https://en.wikipedia.org/wiki/Polygonal_number http://oeis.org/wiki/Polygonal_numbers#Polygonal_roots
Definition at line 153 of file ntheory_funcs.cpp.
n
is divided by d
Definition at line 72 of file ntheory.cpp.
n
is divided by d
Definition at line 94 of file ntheory.cpp.
|
inline |
|
inline |
RCP< const Basic > SymEngine::sdiff | ( | const RCP< const Basic > & | arg, |
const RCP< const Basic > & | x, | ||
bool | cache | ||
) |
SymPy style differentiation for non-symbol variables.
SymPy style differentiation w.r.t non-symbols and symbols.
Definition at line 818 of file derivative.cpp.
Substracts b
from a
.
This essentially implements the addition of a
and -b
. Note that since this calls add()
it performs canonicalization if required.
a | is the minuend. |
b | is the subtrahend. |
a-b
.
|
inline |
|
inline |