SymEngine::UnivariateSeries Class Reference

UnivariateSeries Class. More...

#include <series_generic.h>

+ Inheritance diagram for SymEngine::UnivariateSeries:
+ Collaboration diagram for SymEngine::UnivariateSeries:

Public Member Functions

virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
 UnivariateSeries (const UExprDict &sp, const std::string varname, const unsigned degree)
 
virtual hash_t __hash__ () const
 
virtual int compare (const Basic &o) const
 
bool operator== (const UnivariateSeries &u) const
 
virtual RCP< const Basicas_basic () const
 
virtual umap_int_basic as_dict () const
 
virtual RCP< const Basicget_coeff (int) const
 
virtual RCP< const Numbermul (const Number &other) const
 
virtual RCP< const Numberpow (const Number &other) const
 
- Public Member Functions inherited from SymEngine::SeriesBase< UExprDict, Expression, UnivariateSeries >
 SeriesBase (UExprDict p, std::string var, unsigned degree)
 
virtual unsigned get_degree () const
 
virtual const std::stringget_var () const
 
const UExprDictget_poly () const
 
virtual bool is_zero () const
 
virtual bool is_one () const
 
virtual bool is_minus_one () const
 
virtual bool is_negative () const
 
virtual bool is_positive () const
 
virtual bool is_complex () const
 
virtual bool __eq__ (const Basic &o) const
 Test equality. More...
 
virtual RCP< const Numberadd (const Number &other) const
 Addition.
 
virtual RCP< const Numbermul (const Number &other) const
 Multiplication.
 
virtual RCP< const Numberpow (const Number &other) const
 Power.
 
virtual RCP< const Numberrpow (const Number &other) const
 
- Public Member Functions inherited from SymEngine::Number
virtual RCP< const Basicconjugate () const
 
virtual bool is_exact () const
 return true if the number is an exact representation
 
bool is_exact_zero () const
 
virtual Evaluateget_eval () const
 Get Evaluate singleton to evaluate numerically.
 
virtual RCP< const Numbersub (const Number &other) const
 Subtraction.
 
virtual RCP< const Numberrsub (const Number &other) const
 
virtual RCP< const Numberdiv (const Number &other) const
 Division.
 
virtual RCP< const Numberrdiv (const Number &other) const
 
virtual vec_basic get_args () const
 Returns the list of arguments.
 
virtual bool is_perfect_power (bool is_expected=false) const
 
virtual bool nth_root (const Ptr< RCP< const Number >> &, unsigned long n) const
 
- Public Member Functions inherited from SymEngine::Basic
TypeID get_type_code () const
 
 Basic ()
 Constructor.
 
 Basic (const Basic &)=delete
 Delete the copy constructor and assignment.
 
Basicoperator= (const Basic &)=delete
 Assignment operator in continuation with above.
 
 Basic (Basic &&)=delete
 Delete the move constructor and assignment.
 
Basicoperator= (Basic &&)=delete
 Assignment operator in continuation with above.
 
hash_t hash () const
 
bool __neq__ (const Basic &o) const
 true if this is not equal to o. More...
 
int __cmp__ (const Basic &o) const
 Comparison operator.
 
std::string __str__ () const
 
std::string dumps () const
 Returns a string of the instance serialized.
 
RCP< const Basicsubs (const map_basic_basic &subs_dict) const
 Substitutes 'subs_dict' into 'self'.
 
RCP< const Basicxreplace (const map_basic_basic &subs_dict) const
 
virtual RCP< const Basicexpand_as_exp () const
 expands the special function in terms of exp function
 
RCP< const Basicdiff (const RCP< const Symbol > &x, bool cache=true) const
 
- Public Member Functions inherited from SymEngine::EnableRCPFromThis< Basic >
RCP< Basicrcp_from_this ()
 Get RCP<T> pointer to self (it will cast the pointer to T)
 
RCP< const Basicrcp_from_this () const
 Get RCP<const T> pointer to self (it will cast the pointer to const T)
 
RCP< const T2 > rcp_from_this_cast () const
 Get RCP<T2> pointer to self (it will cast the pointer to T2)
 
unsigned int use_count () const
 

Static Public Member Functions

static RCP< const UnivariateSeriescreate (const RCP< const Symbol > &var, const unsigned int &prec, const UExprDict &s)
 
static RCP< const UnivariateSeriesseries (const RCP< const Basic > &t, const std::string &x, unsigned int prec)
 
static UExprDict var (const std::string &s)
 
static Expression convert (const Basic &x)
 
static int ldegree (const UExprDict &s)
 
static UExprDict mul (const UExprDict &s, const UExprDict &r, unsigned prec)
 
static UExprDict pow (const UExprDict &s, int n, unsigned prec)
 
static Expression find_cf (const UExprDict &s, const UExprDict &var, int deg)
 
static Expression root (Expression &c, unsigned n)
 
static UExprDict diff (const UExprDict &s, const UExprDict &var)
 
static UExprDict integrate (const UExprDict &s, const UExprDict &var)
 
static UExprDict subs (const UExprDict &s, const UExprDict &var, const UExprDict &r, unsigned prec)
 
static Expression sin (const Expression &c)
 
static Expression cos (const Expression &c)
 
static Expression tan (const Expression &c)
 
static Expression asin (const Expression &c)
 
static Expression acos (const Expression &c)
 
static Expression atan (const Expression &c)
 
static Expression sinh (const Expression &c)
 
static Expression cosh (const Expression &c)
 
static Expression tanh (const Expression &c)
 
static Expression asinh (const Expression &c)
 
static Expression acosh (const Expression &c)
 
static Expression atanh (const Expression &c)
 
static Expression exp (const Expression &c)
 
static Expression log (const Expression &c)
 
- Static Public Member Functions inherited from SymEngine::SeriesBase< UExprDict, Expression, UnivariateSeries >
static const std::list< unsigned int > & step_list (unsigned int prec)
 
static UExprDict series_invert (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_reverse (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_nthroot (const UExprDict &s, int n, const UExprDict &var, unsigned int prec)
 
static UExprDict series_atan (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_tan (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_cot (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict _series_sin (const UExprDict &s, unsigned int prec)
 
static UExprDict series_sin (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_csc (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_asin (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_acos (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict _series_cos (const UExprDict &s, unsigned int prec)
 
static UExprDict series_cos (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_sec (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_log (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_exp (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_lambertw (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_sinh (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_cosh (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_atanh (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_asinh (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static UExprDict series_tanh (const UExprDict &s, const UExprDict &var, unsigned int prec)
 
static Expression sin (const Expression &c)
 
static Expression cos (const Expression &c)
 
static Expression tan (const Expression &c)
 
static Expression asin (const Expression &c)
 
static Expression acos (const Expression &c)
 
static Expression atan (const Expression &c)
 
static Expression sinh (const Expression &c)
 
static Expression cosh (const Expression &c)
 
static Expression tanh (const Expression &c)
 
static Expression asinh (const Expression &c)
 
static Expression atanh (const Expression &c)
 
static Expression exp (const Expression &c)
 
static Expression log (const Expression &c)
 
- Static Public Member Functions inherited from SymEngine::Basic
static RCP< const Basicloads (const std::string &)
 Creates an instance of a serialized string.
 

Static Public Attributes

static const TypeID type_code_id = SYMENGINE_UNIVARIATESERIES
 

Additional Inherited Members

- Data Fields inherited from SymEngine::Basic
TypeID type_code_
 
- Protected Attributes inherited from SymEngine::SeriesBase< UExprDict, Expression, UnivariateSeries >
const UExprDict p_
 
const std::string var_
 
const unsigned degree_
 

Detailed Description

UnivariateSeries Class.

Definition at line 16 of file series_generic.h.

Member Function Documentation

◆ __hash__()

hash_t SymEngine::UnivariateSeries::__hash__ ( ) const
virtual

Calculates the hash of the given SymEngine class. Use Basic.hash() which gives a cached version of the hash.

Returns
64-bit integer value for the hash

Implements SymEngine::Basic.

Definition at line 22 of file series_generic.cpp.

23 {
24  hash_t seed = SYMENGINE_UEXPRPOLY;
25  hash_combine(seed, get_degree());
26  for (const auto &it : p_.dict_) {
27  hash_t temp = SYMENGINE_UEXPRPOLY;
28  hash_combine<unsigned int>(temp, it.first);
29  hash_combine<Basic>(temp, *(it.second.get_basic()));
30  seed += temp;
31  }
32  return seed;
33 }
void hash_combine(hash_t &seed, const T &v)
Definition: basic-inl.h:137

◆ compare()

int SymEngine::UnivariateSeries::compare ( const Basic o) const
virtual

Returns -1, 0, 1 for this < o, this == o, this > o. This method is used when you want to sort things like x+y+z into canonical order. This function assumes that o is the same type as this. Use __cmp__ if you want general comparison.

Implements SymEngine::Basic.

Definition at line 35 of file series_generic.cpp.

36 {
37  SYMENGINE_ASSERT(is_a<UnivariateSeries>(other))
38  const UnivariateSeries &o_ = down_cast<const UnivariateSeries &>(other);
39  return p_.compare(o_.get_poly());
40 }

Field Documentation

◆ type_code_id

const TypeID SymEngine::UnivariateSeries::type_code_id = SYMENGINE_UNIVARIATESERIES
static

Type_code_id shared by all instances

Definition at line 24 of file series_generic.h.


The documentation for this class was generated from the following files: