Loading...
Searching...
No Matches
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
 Multiplication. More...
 
virtual RCP< const Numberpow (const Number &other) const
 Power. More...
 
- 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. More...
 
virtual RCP< const Numbermul (const Number &other) const
 Multiplication. More...
 
virtual RCP< const Numberpow (const Number &other) const
 Power. More...
 
virtual RCP< const Numberrpow (const Number &other) const
 
virtual RCP< const Basicas_basic () const =0
 
virtual umap_int_basic as_dict () const =0
 
virtual RCP< const Basicget_coeff (int) const =0
 
virtual unsigned get_degree () const =0
 
virtual const std::stringget_var () const =0
 
- Public Member Functions inherited from SymEngine::Number
virtual bool is_zero () const =0
 
virtual bool is_one () const =0
 
virtual bool is_minus_one () const =0
 
virtual bool is_negative () const =0
 
virtual bool is_positive () const =0
 
virtual bool is_complex () const =0
 
virtual RCP< const Basicconjugate () const
 
virtual bool is_exact () const
 return true if the number is an exact representation More...
 
bool is_exact_zero () const
 
virtual Evaluateget_eval () const
 Get Evaluate singleton to evaluate numerically. More...
 
virtual RCP< const Numberadd (const Number &other) const =0
 Addition. More...
 
virtual RCP< const Numbersub (const Number &other) const
 Subtraction. More...
 
virtual RCP< const Numberrsub (const Number &other) const
 
virtual RCP< const Numbermul (const Number &other) const =0
 Multiplication. More...
 
virtual RCP< const Numberdiv (const Number &other) const
 Division. More...
 
virtual RCP< const Numberrdiv (const Number &other) const
 
virtual RCP< const Numberpow (const Number &other) const =0
 Power. More...
 
virtual RCP< const Numberrpow (const Number &other) const =0
 
virtual vec_basic get_args () const
 Returns the list of arguments. More...
 
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. More...
 
 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.
 
virtual hash_t __hash__ () const =0
 
hash_t hash () const
 
virtual bool __eq__ (const Basic &o) const =0
 Test equality. More...
 
bool __neq__ (const Basic &o) const
 true if this is not equal to o. More...
 
int __cmp__ (const Basic &o) const
 Comparison operator. More...
 
virtual int compare (const Basic &o) const =0
 
std::string __str__ () const
 
std::string dumps () const
 Returns a string of the instance serialized. More...
 
RCP< const Basicsubs (const map_basic_basic &subs_dict) const
 Substitutes 'subs_dict' into 'self'. More...
 
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 More...
 
virtual vec_basic get_args () const =0
 Returns the list of arguments. More...
 
virtual void accept (Visitor &v) const =0
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const =0
 
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) More...
 
RCP< const Basicrcp_from_this () const
 Get RCP<const T> pointer to self (it will cast the pointer to const T) More...
 
RCP< const T2 > rcp_from_this_cast () const
 Get RCP<T2> pointer to self (it will cast the pointer to T2) More...
 
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. More...
 

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.

Constructor & Destructor Documentation

◆ UnivariateSeries()

SymEngine::UnivariateSeries::UnivariateSeries ( const UExprDict sp,
const std::string  varname,
const unsigned  degree 
)
inline

Definition at line 25 of file series_generic.h.

27 : SeriesBase(std::move(sp), varname, degree)
28 {
29 SYMENGINE_ASSIGN_TYPEID()
30 }
T move(T... args)

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:146

◆ accept() [1/2]

virtual void SymEngine::UnivariateSeries::accept ( EvalRealDoubleVisitorFinal v) const
virtual

Implements SymEngine::Basic.

◆ accept() [2/2]

virtual void SymEngine::UnivariateSeries::accept ( Visitor v) const
virtual

Implements SymEngine::Basic.

◆ acos()

Expression SymEngine::UnivariateSeries::acos ( const Expression c)
static

Definition at line 202 of file series_generic.cpp.

203{
204 return SymEngine::acos(c.get_basic());
205}
RCP< const Basic > acos(const RCP< const Basic > &arg)
Canonicalize ACos:
Definition: functions.cpp:1402

◆ as_basic()

RCP< const Basic > SymEngine::UnivariateSeries::as_basic ( ) const
virtual

Implements SymEngine::SeriesCoeffInterface.

Definition at line 42 of file series_generic.cpp.

43{
44 return p_.get_basic(var_);
45}

◆ as_dict()

umap_int_basic SymEngine::UnivariateSeries::as_dict ( ) const
virtual

Implements SymEngine::SeriesCoeffInterface.

Definition at line 47 of file series_generic.cpp.

48{
49 umap_int_basic map;
50 for (const auto &it : p_.get_dict())
51 if (it.second != 0)
52 map[it.first] = it.second.get_basic();
53 return map;
54}

◆ asin()

Expression SymEngine::UnivariateSeries::asin ( const Expression c)
static

Definition at line 197 of file series_generic.cpp.

198{
199 return SymEngine::asin(c.get_basic());
200}
RCP< const Basic > asin(const RCP< const Basic > &arg)
Canonicalize ASin:
Definition: functions.cpp:1360

◆ asinh()

Expression SymEngine::UnivariateSeries::asinh ( const Expression c)
static

Definition at line 227 of file series_generic.cpp.

228{
229 return SymEngine::asinh(c.get_basic());
230}
RCP< const Basic > asinh(const RCP< const Basic > &arg)
Canonicalize ASinh:
Definition: functions.cpp:2376

◆ atan()

Expression SymEngine::UnivariateSeries::atan ( const Expression c)
static

Definition at line 207 of file series_generic.cpp.

208{
209 return SymEngine::atan(c.get_basic());
210}
RCP< const Basic > atan(const RCP< const Basic > &arg)
Canonicalize ATan:
Definition: functions.cpp:1524

◆ atanh()

Expression SymEngine::UnivariateSeries::atanh ( const Expression c)
static

Definition at line 232 of file series_generic.cpp.

233{
234 return SymEngine::atanh(c.get_basic());
235}
RCP< const Basic > atanh(const RCP< const Basic > &arg)
Canonicalize ATanh:
Definition: functions.cpp:2494

◆ 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}

◆ convert()

Expression SymEngine::UnivariateSeries::convert ( const Basic x)
static

Definition at line 69 of file series_generic.cpp.

70{
71 return Expression(x.rcp_from_this());
72}

◆ cos()

Expression SymEngine::UnivariateSeries::cos ( const Expression c)
static

Definition at line 187 of file series_generic.cpp.

188{
189 return SymEngine::cos(c.get_basic());
190}
RCP< const Basic > cos(const RCP< const Basic > &arg)
Canonicalize Cos:
Definition: functions.cpp:942

◆ cosh()

Expression SymEngine::UnivariateSeries::cosh ( const Expression c)
static

Definition at line 217 of file series_generic.cpp.

218{
219 return SymEngine::cosh(c.get_basic());
220}
RCP< const Basic > cosh(const RCP< const Basic > &arg)
Canonicalize Cosh:
Definition: functions.cpp:2212

◆ create()

static RCP< const UnivariateSeries > SymEngine::UnivariateSeries::create ( const RCP< const Symbol > &  var,
const unsigned int &  prec,
const UExprDict s 
)
inlinestatic

Definition at line 32 of file series_generic.h.

35 {
36 return make_rcp<const UnivariateSeries>(std::move(s), var->get_name(),
37 prec);
38 }

◆ diff()

UExprDict SymEngine::UnivariateSeries::diff ( const UExprDict s,
const UExprDict var 
)
static

Definition at line 142 of file series_generic.cpp.

143{
144 if (var.get_dict().size() == 1 and var.get_dict().at(1) == Expression(1)) {
145 map_int_Expr d;
146 for (const auto &p : s.get_dict()) {
147 if (p.first != 0)
148 d[p.first - 1] = p.second * p.first;
149 }
150 return UExprDict(d);
151 } else {
152 return UExprDict({{0, Expression(0)}});
153 }
154}
T at(T... args)
T size(T... args)

◆ exp()

Expression SymEngine::UnivariateSeries::exp ( const Expression c)
static

Definition at line 237 of file series_generic.cpp.

238{
239 return SymEngine::exp(c.get_basic());
240}
RCP< const Basic > exp(const RCP< const Basic > &x)
Returns the natural exponential function E**x = pow(E, x)
Definition: pow.cpp:271

◆ find_cf()

Expression SymEngine::UnivariateSeries::find_cf ( const UExprDict s,
const UExprDict var,
int  deg 
)
static

Definition at line 128 of file series_generic.cpp.

130{
131 if (s.get_dict().count(deg) == 0)
132 return Expression(0);
133 else
134 return (s.get_dict()).at(deg);
135}

◆ get_coeff()

RCP< const Basic > SymEngine::UnivariateSeries::get_coeff ( int  deg) const
virtual

Implements SymEngine::SeriesCoeffInterface.

Definition at line 56 of file series_generic.cpp.

57{
58 if (p_.get_dict().count(deg) == 0)
59 return zero;
60 else
61 return p_.get_dict().at(deg).get_basic();
62}
T count(T... args)

◆ integrate()

UExprDict SymEngine::UnivariateSeries::integrate ( const UExprDict s,
const UExprDict var 
)
static

Definition at line 156 of file series_generic.cpp.

157{
158 map_int_Expr dict;
159 for (auto &it : s.get_dict()) {
160 if (it.first != -1) {
161 dict.insert(std::pair<int, Expression>(it.first + 1,
162 it.second / (it.first + 1)));
163 } else {
164 throw NotImplementedError("Not Implemented");
165 }
166 }
167
168 return UExprDict(dict);
169}
T insert(T... args)

◆ ldegree()

int SymEngine::UnivariateSeries::ldegree ( const UExprDict s)
static

Definition at line 74 of file series_generic.cpp.

75{
76 return s.get_dict().begin()->first;
77}

◆ log()

Expression SymEngine::UnivariateSeries::log ( const Expression c)
static

Definition at line 242 of file series_generic.cpp.

243{
244 return SymEngine::log(c.get_basic());
245}
RCP< const Basic > log(const RCP< const Basic > &arg)
Returns the Natural Logarithm from argument arg
Definition: functions.cpp:1774

◆ mul() [1/2]

virtual RCP< const Number > SymEngine::SeriesBase< Poly, Coeff, Series >::mul ( const Number other) const
inlinevirtual

Multiplication.

Reimplemented from SymEngine::SeriesBase< UExprDict, Expression, UnivariateSeries >.

Definition at line 110 of file series.h.

111 {
112 if (is_a<Series>(other)) {
113 const Series &o = down_cast<const Series &>(other);
114 auto deg = std::min(degree_, o.degree_);
115 if (var_ != o.var_) {
116 throw NotImplementedError(
117 "Multivariate Series not implemented");
118 }
119 return make_rcp<Series>(Series::mul(p_, o.p_, deg), var_, deg);
120 } else if (other.get_type_code() < Series::type_code_id) {
121 Poly p = Series::series(other.rcp_from_this(), var_, degree_)->p_;
122 return make_rcp<Series>(Series::mul(p_, p, degree_), var_, degree_);
123 } else {
124 return other.mul(*this);
125 }
126 }
T min(T... args)

◆ mul() [2/2]

UExprDict SymEngine::UnivariateSeries::mul ( const UExprDict s,
const UExprDict r,
unsigned  prec 
)
static

Definition at line 79 of file series_generic.cpp.

81{
82 map_int_Expr p;
83 for (auto &it1 : a.get_dict()) {
84 for (auto &it2 : b.get_dict()) {
85 int exp = it1.first + it2.first;
86 if (exp < (int)prec) {
87 p[exp] += it1.second * it2.second;
88 } else {
89 break;
90 }
91 }
92 }
93 return UExprDict(p);
94}
T exp(T... args)

◆ pow() [1/2]

virtual RCP< const Number > SymEngine::SeriesBase< Poly, Coeff, Series >::pow ( const Number other) const
inlinevirtual

Power.

Reimplemented from SymEngine::SeriesBase< UExprDict, Expression, UnivariateSeries >.

Definition at line 128 of file series.h.

129 {
130 auto deg = degree_;
131 Poly p;
132 if (is_a<Series>(other)) {
133 const Series &o = down_cast<const Series &>(other);
134 deg = std::min(deg, o.degree_);
135 if (var_ != o.var_) {
136 throw NotImplementedError(
137 "Multivariate Series not implemented");
138 }
139 p = o.p_;
140 } else if (is_a<Integer>(other)) {
141 if (other.is_negative()) {
142 p = Series::pow(
143 p_,
144 (numeric_cast<int>(
145 down_cast<const Integer &>(other).neg()->as_int())),
146 deg);
147 p = Series::series_invert(p, Series::var(var_), deg);
148 return make_rcp<Series>(p, var_, deg);
149 }
150 p = Series::pow(
151 p_,
152 numeric_cast<int>((down_cast<const Integer &>(other).as_int())),
153 deg);
154 return make_rcp<Series>(p, var_, deg);
155 } else if (other.get_type_code() < Series::type_code_id) {
156 p = Series::series(other.rcp_from_this(), var_, degree_)->p_;
157 } else {
158 return other.rpow(*this);
159 }
160 p = Series::series_exp(
161 Poly(p * Series::series_log(p_, Series::var(var_), deg)),
162 Series::var(var_), deg);
163 return make_rcp<Series>(p, var_, deg);
164 }
RCP< const Basic > neg(const RCP< const Basic > &a)
Negation.
Definition: mul.cpp:443

◆ pow() [2/2]

UExprDict SymEngine::UnivariateSeries::pow ( const UExprDict s,
int  n,
unsigned  prec 
)
static

Definition at line 96 of file series_generic.cpp.

97{
98 if (exp < 0) {
99 SYMENGINE_ASSERT(base.size() == 1)
100 map_int_Expr dict;
101 dict[-(base.get_dict().begin()->first)]
102 = 1 / base.get_dict().begin()->second;
103 return pow(UExprDict(dict), -exp, prec);
104 }
105 if (exp == 0) {
106 if (base == 0 or base.get_dict().size() == 0) {
107 throw DomainError("Error: 0**0 is undefined.");
108 } else {
109 return UExprDict(1);
110 }
111 }
112
113 UExprDict x(base);
114 UExprDict y(1);
115 while (exp > 1) {
116 if (exp % 2 == 0) {
117 x = mul(x, x, prec);
118 exp /= 2;
119 } else {
120 y = mul(x, y, prec);
121 x = mul(x, x, prec);
122 exp = (exp - 1) / 2;
123 }
124 }
125 return mul(x, y, prec);
126}

◆ root()

Expression SymEngine::UnivariateSeries::root ( Expression c,
unsigned  n 
)
static

Definition at line 137 of file series_generic.cpp.

138{
139 return SymEngine::pow(c, 1 / Expression(n));
140}

◆ series()

RCP< const UnivariateSeries > SymEngine::UnivariateSeries::series ( const RCP< const Basic > &  t,
const std::string x,
unsigned int  prec 
)
static

Definition at line 12 of file series_generic.cpp.

15{
16 UExprDict p({{1, Expression(1)}});
17 SeriesVisitor<UExprDict, Expression, UnivariateSeries> visitor(std::move(p),
18 x, prec);
19 return visitor.series(t);
20}

◆ sin()

Expression SymEngine::UnivariateSeries::sin ( const Expression c)
static

Definition at line 182 of file series_generic.cpp.

183{
184 return SymEngine::sin(c.get_basic());
185}
RCP< const Basic > sin(const RCP< const Basic > &arg)
Canonicalize Sin:
Definition: functions.cpp:874

◆ sinh()

Expression SymEngine::UnivariateSeries::sinh ( const Expression c)
static

Definition at line 212 of file series_generic.cpp.

213{
214 return SymEngine::sinh(c.get_basic());
215}
RCP< const Basic > sinh(const RCP< const Basic > &arg)
Canonicalize Sinh:
Definition: functions.cpp:2127

◆ subs()

UExprDict SymEngine::UnivariateSeries::subs ( const UExprDict s,
const UExprDict var,
const UExprDict r,
unsigned  prec 
)
static

Definition at line 171 of file series_generic.cpp.

173{
174 UExprDict result({{1, Expression(1)}});
175
176 for (auto &i : s.get_dict())
177 result += i.second * pow(r, i.first, prec);
178
179 return result;
180}

◆ tan()

Expression SymEngine::UnivariateSeries::tan ( const Expression c)
static

Definition at line 192 of file series_generic.cpp.

193{
194 return SymEngine::tan(c.get_basic());
195}
RCP< const Basic > tan(const RCP< const Basic > &arg)
Canonicalize Tan:
Definition: functions.cpp:1007

◆ tanh()

Expression SymEngine::UnivariateSeries::tanh ( const Expression c)
static

Definition at line 222 of file series_generic.cpp.

223{
224 return SymEngine::tanh(c.get_basic());
225}
RCP< const Basic > tanh(const RCP< const Basic > &arg)
Canonicalize Tanh:
Definition: functions.cpp:2290

◆ var()

UExprDict SymEngine::UnivariateSeries::var ( const std::string s)
static

Definition at line 64 of file series_generic.cpp.

65{
66 return UExprDict({{1, Expression(1)}});
67}

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: