symengine 0.14.0__cp313-cp313t-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- symengine/lib/flint-19.dll +0 -0
- symengine/lib/libgcc_s_seh-1.dll +0 -0
- symengine/lib/libgmp-10.dll +0 -0
- symengine/lib/libmpc-3.dll +0 -0
- symengine/lib/libmpfr-6.dll +0 -0
- symengine/lib/libwinpthread-1.dll +0 -0
- symengine/lib/pywrapper.h +220 -0
- symengine/lib/symengine.pxd +955 -0
- symengine/lib/symengine_wrapper.cp313t-win_amd64.lib +0 -0
- symengine/lib/symengine_wrapper.cp313t-win_amd64.pyd +0 -0
- symengine/lib/symengine_wrapper.pxd +78 -0
- symengine/lib/zlib.dll +0 -0
- symengine/lib/zstd.dll +0 -0
- symengine-0.14.0.data/purelib/symengine/__init__.py +79 -0
- symengine-0.14.0.data/purelib/symengine/functions.py +10 -0
- symengine-0.14.0.data/purelib/symengine/lib/__init__.py +0 -0
- symengine-0.14.0.data/purelib/symengine/printing.py +33 -0
- symengine-0.14.0.data/purelib/symengine/sympy_compat.py +4 -0
- symengine-0.14.0.data/purelib/symengine/test_utilities.py +95 -0
- symengine-0.14.0.data/purelib/symengine/tests/__init__.py +0 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_arit.py +261 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_cse.py +17 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_dict_basic.py +28 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_eval.py +67 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_expr.py +28 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_functions.py +432 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_lambdify.py +863 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_logic.py +124 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_matrices.py +757 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_ntheory.py +254 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_number.py +186 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_pickling.py +59 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_printing.py +38 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_sage.py +175 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_series_expansion.py +22 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_sets.py +118 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_solve.py +25 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_subs.py +82 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_symbol.py +179 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_sympify.py +63 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_sympy_compat.py +200 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_sympy_conv.py +835 -0
- symengine-0.14.0.data/purelib/symengine/tests/test_var.py +68 -0
- symengine-0.14.0.data/purelib/symengine/utilities.py +280 -0
- symengine-0.14.0.dist-info/AUTHORS +40 -0
- symengine-0.14.0.dist-info/LICENSE +430 -0
- symengine-0.14.0.dist-info/METADATA +39 -0
- symengine-0.14.0.dist-info/RECORD +50 -0
- symengine-0.14.0.dist-info/WHEEL +5 -0
- symengine-0.14.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,955 @@
|
|
1
|
+
from libcpp cimport bool
|
2
|
+
from libcpp.string cimport string
|
3
|
+
from libcpp.map cimport map
|
4
|
+
from libcpp.vector cimport vector
|
5
|
+
from cpython.ref cimport PyObject
|
6
|
+
from libcpp.pair cimport pair
|
7
|
+
from libcpp.set cimport set
|
8
|
+
from libcpp.unordered_map cimport unordered_map
|
9
|
+
|
10
|
+
cdef extern from "<set>" namespace "std":
|
11
|
+
# Cython's libcpp.set does not support multiset in 0.29.x
|
12
|
+
cdef cppclass multiset[T]:
|
13
|
+
cppclass iterator:
|
14
|
+
T& operator*()
|
15
|
+
iterator operator++() nogil
|
16
|
+
iterator operator--() nogil
|
17
|
+
bint operator==(iterator) nogil
|
18
|
+
bint operator!=(iterator) nogil
|
19
|
+
iterator begin() nogil
|
20
|
+
iterator end() nogil
|
21
|
+
iterator insert(T&) nogil
|
22
|
+
|
23
|
+
cdef extern from 'symengine/mp_class.h' namespace "SymEngine":
|
24
|
+
ctypedef unsigned long mp_limb_t
|
25
|
+
ctypedef struct __mpz_struct:
|
26
|
+
pass
|
27
|
+
ctypedef struct __mpq_struct:
|
28
|
+
pass
|
29
|
+
ctypedef __mpz_struct mpz_t[1]
|
30
|
+
ctypedef __mpq_struct mpq_t[1]
|
31
|
+
|
32
|
+
cdef cppclass integer_class:
|
33
|
+
integer_class()
|
34
|
+
integer_class(int i)
|
35
|
+
integer_class(integer_class)
|
36
|
+
integer_class(mpz_t)
|
37
|
+
integer_class(const string &s) except +
|
38
|
+
mpz_t get_mpz_t(integer_class &a)
|
39
|
+
const mpz_t get_mpz_t(const integer_class &a)
|
40
|
+
string mp_get_hex_str(const integer_class &a)
|
41
|
+
void mp_set_str(integer_class &a, const string &s)
|
42
|
+
cdef cppclass rational_class:
|
43
|
+
rational_class()
|
44
|
+
rational_class(mpq_t)
|
45
|
+
const mpq_t get_mpq_t(const rational_class &a)
|
46
|
+
|
47
|
+
cdef extern from "<symengine/symengine_rcp.h>" namespace "SymEngine":
|
48
|
+
cdef enum ENull:
|
49
|
+
null
|
50
|
+
|
51
|
+
cdef cppclass RCP[T]:
|
52
|
+
T& operator*() nogil
|
53
|
+
# Not yet supported in Cython:
|
54
|
+
# RCP[T]& operator=(RCP[T] &r_ptr) nogil except +
|
55
|
+
void reset() nogil except +
|
56
|
+
|
57
|
+
cdef cppclass Ptr[T]:
|
58
|
+
T& operator*() nogil except +
|
59
|
+
|
60
|
+
void print_stack_on_segfault() nogil
|
61
|
+
|
62
|
+
cdef extern from "<symengine/basic.h>" namespace "SymEngine":
|
63
|
+
ctypedef Basic const_Basic "const SymEngine::Basic"
|
64
|
+
# RCP[const_Basic] instead of RCP[const Basic] is because of https://github.com/cython/cython/issues/5478
|
65
|
+
ctypedef RCP[const_Basic] rcp_const_basic "SymEngine::RCP<const SymEngine::Basic>"
|
66
|
+
#cdef cppclass rcp_const_basic "SymEngine::RCP<const SymEngine::Basic>":
|
67
|
+
# Basic& operator*() nogil
|
68
|
+
# void reset() nogil except +
|
69
|
+
# pass
|
70
|
+
# Cython has broken support for the following:
|
71
|
+
# ctypedef map[rcp_const_basic, rcp_const_basic] map_basic_basic
|
72
|
+
# So instead we replicate the map features we need here
|
73
|
+
cdef cppclass std_pair_short_rcp_const_basic "std::pair<short, SymEngine::RCP<const SymEngine::Basic>>":
|
74
|
+
short first
|
75
|
+
rcp_const_basic second
|
76
|
+
|
77
|
+
cdef cppclass std_pair_rcp_const_basic_rcp_const_basic "std::pair<SymEngine::RCP<const SymEngine::Basic>, SymEngine::RCP<const SymEngine::Basic>>":
|
78
|
+
rcp_const_basic first
|
79
|
+
rcp_const_basic second
|
80
|
+
|
81
|
+
cdef cppclass map_basic_basic:
|
82
|
+
map_basic_basic() except +
|
83
|
+
map_basic_basic(map_basic_basic&) except +
|
84
|
+
cppclass iterator:
|
85
|
+
std_pair_rcp_const_basic_rcp_const_basic& operator*()
|
86
|
+
iterator operator++()
|
87
|
+
iterator operator--()
|
88
|
+
bint operator==(iterator)
|
89
|
+
bint operator!=(iterator)
|
90
|
+
rcp_const_basic& operator[](rcp_const_basic&)
|
91
|
+
void clear()
|
92
|
+
bint empty()
|
93
|
+
size_t size()
|
94
|
+
void swap(map_basic_basic&)
|
95
|
+
iterator begin()
|
96
|
+
iterator end()
|
97
|
+
iterator find(rcp_const_basic&)
|
98
|
+
void erase(iterator, iterator)
|
99
|
+
void erase_it(iterator)
|
100
|
+
size_t erase(rcp_const_basic&)
|
101
|
+
pair[iterator, bint] insert(std_pair_rcp_const_basic_rcp_const_basic) except +
|
102
|
+
iterator insert(iterator, std_pair_rcp_const_basic_rcp_const_basic) except +
|
103
|
+
void insert(iterator, iterator) except +
|
104
|
+
|
105
|
+
ctypedef vector[rcp_const_basic] vec_basic "SymEngine::vec_basic"
|
106
|
+
ctypedef vector[RCP[Symbol]] vec_sym "SymEngine::vec_sym"
|
107
|
+
ctypedef vector[RCP[Integer]] vec_integer "SymEngine::vec_integer"
|
108
|
+
ctypedef map[RCP[Integer], unsigned] map_integer_uint "SymEngine::map_integer_uint"
|
109
|
+
cdef struct RCPIntegerKeyLess
|
110
|
+
cdef struct RCPBasicKeyLess
|
111
|
+
ctypedef set[rcp_const_basic] set_basic "SymEngine::set_basic"
|
112
|
+
ctypedef multiset[rcp_const_basic] multiset_basic "SymEngine::multiset_basic"
|
113
|
+
|
114
|
+
cdef cppclass Basic:
|
115
|
+
string __str__() nogil except +
|
116
|
+
unsigned int hash() nogil except +
|
117
|
+
vec_basic get_args() nogil
|
118
|
+
int __cmp__(const Basic &o) nogil
|
119
|
+
|
120
|
+
ctypedef RCP[const Number] rcp_const_number "SymEngine::RCP<const SymEngine::Number>"
|
121
|
+
ctypedef unordered_map[int, rcp_const_basic] umap_int_basic "SymEngine::umap_int_basic"
|
122
|
+
ctypedef unordered_map[int, rcp_const_basic].iterator umap_int_basic_iterator "SymEngine::umap_int_basic::iterator"
|
123
|
+
ctypedef unordered_map[rcp_const_basic, rcp_const_number] umap_basic_num "SymEngine::umap_basic_num"
|
124
|
+
ctypedef unordered_map[rcp_const_basic, rcp_const_number].iterator umap_basic_num_iterator "SymEngine::umap_basic_num::iterator"
|
125
|
+
ctypedef vector[pair[rcp_const_basic, rcp_const_basic]] vec_pair "SymEngine::vec_pair"
|
126
|
+
|
127
|
+
bool eq(const Basic &a, const Basic &b) nogil except +
|
128
|
+
bool neq(const Basic &a, const Basic &b) nogil except +
|
129
|
+
|
130
|
+
RCP[const Symbol] rcp_static_cast_Symbol "SymEngine::rcp_static_cast<const SymEngine::Symbol>"(rcp_const_basic &b) nogil
|
131
|
+
RCP[const PySymbol] rcp_static_cast_PySymbol "SymEngine::rcp_static_cast<const SymEngine::PySymbol>"(rcp_const_basic &b) nogil except +
|
132
|
+
RCP[const Integer] rcp_static_cast_Integer "SymEngine::rcp_static_cast<const SymEngine::Integer>"(rcp_const_basic &b) nogil
|
133
|
+
RCP[const Rational] rcp_static_cast_Rational "SymEngine::rcp_static_cast<const SymEngine::Rational>"(rcp_const_basic &b) nogil
|
134
|
+
RCP[const Complex] rcp_static_cast_Complex "SymEngine::rcp_static_cast<const SymEngine::Complex>"(rcp_const_basic &b) nogil
|
135
|
+
RCP[const Number] rcp_static_cast_Number "SymEngine::rcp_static_cast<const SymEngine::Number>"(rcp_const_basic &b) nogil
|
136
|
+
RCP[const Add] rcp_static_cast_Add "SymEngine::rcp_static_cast<const SymEngine::Add>"(rcp_const_basic &b) nogil
|
137
|
+
RCP[const Mul] rcp_static_cast_Mul "SymEngine::rcp_static_cast<const SymEngine::Mul>"(rcp_const_basic &b) nogil
|
138
|
+
RCP[const Pow] rcp_static_cast_Pow "SymEngine::rcp_static_cast<const SymEngine::Pow>"(rcp_const_basic &b) nogil
|
139
|
+
RCP[const OneArgFunction] rcp_static_cast_OneArgFunction "SymEngine::rcp_static_cast<const SymEngine::OneArgFunction>"(rcp_const_basic &b) nogil
|
140
|
+
RCP[const FunctionSymbol] rcp_static_cast_FunctionSymbol "SymEngine::rcp_static_cast<const SymEngine::FunctionSymbol>"(rcp_const_basic &b) nogil
|
141
|
+
RCP[const FunctionWrapper] rcp_static_cast_FunctionWrapper "SymEngine::rcp_static_cast<const SymEngine::FunctionWrapper>"(rcp_const_basic &b) nogil
|
142
|
+
RCP[const Abs] rcp_static_cast_Abs "SymEngine::rcp_static_cast<const SymEngine::Abs>"(rcp_const_basic &b) nogil
|
143
|
+
RCP[const Max] rcp_static_cast_Max "SymEngine::rcp_static_cast<const SymEngine::Max>"(rcp_const_basic &b) nogil
|
144
|
+
RCP[const Min] rcp_static_cast_Min "SymEngine::rcp_static_cast<const SymEngine::Min>"(rcp_const_basic &b) nogil
|
145
|
+
RCP[const Infty] rcp_static_cast_Infty "SymEngine::rcp_static_cast<const SymEngine::Infty>"(rcp_const_basic &b) nogil
|
146
|
+
RCP[const Gamma] rcp_static_cast_Gamma "SymEngine::rcp_static_cast<const SymEngine::Gamma>"(rcp_const_basic &b) nogil
|
147
|
+
RCP[const Derivative] rcp_static_cast_Derivative "SymEngine::rcp_static_cast<const SymEngine::Derivative>"(rcp_const_basic &b) nogil
|
148
|
+
RCP[const Subs] rcp_static_cast_Subs "SymEngine::rcp_static_cast<const SymEngine::Subs>"(rcp_const_basic &b) nogil
|
149
|
+
RCP[const RealDouble] rcp_static_cast_RealDouble "SymEngine::rcp_static_cast<const SymEngine::RealDouble>"(rcp_const_basic &b) nogil
|
150
|
+
RCP[const ComplexDouble] rcp_static_cast_ComplexDouble "SymEngine::rcp_static_cast<const SymEngine::ComplexDouble>"(rcp_const_basic &b) nogil
|
151
|
+
RCP[const ComplexBase] rcp_static_cast_ComplexBase "SymEngine::rcp_static_cast<const SymEngine::ComplexBase>"(rcp_const_basic &b) nogil
|
152
|
+
RCP[const RealMPFR] rcp_static_cast_RealMPFR "SymEngine::rcp_static_cast<const SymEngine::RealMPFR>"(rcp_const_basic &b) nogil
|
153
|
+
RCP[const ComplexMPC] rcp_static_cast_ComplexMPC "SymEngine::rcp_static_cast<const SymEngine::ComplexMPC>"(rcp_const_basic &b) nogil
|
154
|
+
RCP[const Log] rcp_static_cast_Log "SymEngine::rcp_static_cast<const SymEngine::Log>"(rcp_const_basic &b) nogil
|
155
|
+
RCP[const BooleanAtom] rcp_static_cast_BooleanAtom "SymEngine::rcp_static_cast<const SymEngine::BooleanAtom>"(rcp_const_basic &b) nogil
|
156
|
+
RCP[const PyNumber] rcp_static_cast_PyNumber "SymEngine::rcp_static_cast<const SymEngine::PyNumber>"(rcp_const_basic &b) nogil
|
157
|
+
RCP[const PyFunction] rcp_static_cast_PyFunction "SymEngine::rcp_static_cast<const SymEngine::PyFunction>"(rcp_const_basic &b) nogil
|
158
|
+
RCP[const Boolean] rcp_static_cast_Boolean "SymEngine::rcp_static_cast<const SymEngine::Boolean>"(rcp_const_basic &b) nogil
|
159
|
+
RCP[const Set] rcp_static_cast_Set "SymEngine::rcp_static_cast<const SymEngine::Set>"(rcp_const_basic &b) nogil
|
160
|
+
Ptr[RCP[Basic]] outArg(rcp_const_basic &arg) nogil
|
161
|
+
Ptr[RCP[Integer]] outArg_Integer "SymEngine::outArg<SymEngine::RCP<const SymEngine::Integer>>"(RCP[const Integer] &arg) nogil
|
162
|
+
|
163
|
+
bool is_a[T] (const Basic &b) nogil
|
164
|
+
bool is_a_sub[T] (const Basic &b) nogil
|
165
|
+
rcp_const_basic expand(rcp_const_basic &o, bool deep) nogil except +
|
166
|
+
void as_numer_denom(rcp_const_basic &x, const Ptr[RCP[Basic]] &numer, const Ptr[RCP[Basic]] &denom) nogil
|
167
|
+
void as_real_imag(rcp_const_basic &x, const Ptr[RCP[Basic]] &real, const Ptr[RCP[Basic]] &imag) nogil
|
168
|
+
void cse(vec_pair &replacements, vec_basic &reduced_exprs, const vec_basic &exprs) nogil except +
|
169
|
+
|
170
|
+
cdef extern from "<symengine/subs.h>" namespace "SymEngine":
|
171
|
+
rcp_const_basic msubs (rcp_const_basic &x, const map_basic_basic &x) nogil except +
|
172
|
+
rcp_const_basic ssubs (rcp_const_basic &x, const map_basic_basic &x) nogil except +
|
173
|
+
rcp_const_basic xreplace (rcp_const_basic &x, const map_basic_basic &x) nogil except +
|
174
|
+
|
175
|
+
cdef extern from "<symengine/derivative.h>" namespace "SymEngine":
|
176
|
+
rcp_const_basic diff "SymEngine::sdiff"(rcp_const_basic &arg, rcp_const_basic &x) nogil except +
|
177
|
+
|
178
|
+
cdef extern from "<symengine/symbol.h>" namespace "SymEngine":
|
179
|
+
cdef cppclass Symbol(Basic):
|
180
|
+
Symbol(string name) nogil
|
181
|
+
string get_name() nogil
|
182
|
+
cdef cppclass Dummy(Symbol):
|
183
|
+
pass
|
184
|
+
|
185
|
+
cdef extern from "<symengine/number.h>" namespace "SymEngine":
|
186
|
+
cdef cppclass Number(Basic):
|
187
|
+
bool is_positive() nogil
|
188
|
+
bool is_negative() nogil
|
189
|
+
bool is_zero() nogil
|
190
|
+
bool is_one() nogil
|
191
|
+
bool is_minus_one() nogil
|
192
|
+
bool is_complex() nogil
|
193
|
+
pass
|
194
|
+
cdef cppclass NumberWrapper(Basic):
|
195
|
+
pass
|
196
|
+
cdef tribool is_zero(const Basic &x) nogil
|
197
|
+
cdef tribool is_positive(const Basic &x) nogil
|
198
|
+
cdef tribool is_negative(const Basic &x) nogil
|
199
|
+
cdef tribool is_nonnegative(const Basic &x) nogil
|
200
|
+
cdef tribool is_nonpositive(const Basic &x) nogil
|
201
|
+
cdef tribool is_real(const Basic &x) nogil
|
202
|
+
|
203
|
+
cdef extern from "pywrapper.h" namespace "SymEngine":
|
204
|
+
cdef cppclass PyNumber(NumberWrapper):
|
205
|
+
PyObject* get_py_object()
|
206
|
+
cdef cppclass PyModule:
|
207
|
+
pass
|
208
|
+
cdef cppclass PyFunctionClass:
|
209
|
+
PyObject* call(const vec_basic &vec)
|
210
|
+
cdef cppclass PyFunction:
|
211
|
+
PyObject* get_py_object()
|
212
|
+
|
213
|
+
cdef extern from "pywrapper.h" namespace "SymEngine":
|
214
|
+
cdef cppclass PySymbol(Symbol):
|
215
|
+
PySymbol(string name, PyObject* pyobj, bool use_pickle) except +
|
216
|
+
PyObject* get_py_object() except +
|
217
|
+
|
218
|
+
string wrapper_dumps(const Basic &x) nogil except +
|
219
|
+
rcp_const_basic wrapper_loads(const string &s) nogil except +
|
220
|
+
|
221
|
+
cdef extern from "<symengine/integer.h>" namespace "SymEngine":
|
222
|
+
cdef cppclass Integer(Number):
|
223
|
+
Integer(int i) nogil
|
224
|
+
Integer(integer_class i) nogil
|
225
|
+
int compare(const Basic &o) nogil
|
226
|
+
integer_class as_integer_class() nogil
|
227
|
+
RCP[Number] divint(const Integer &other) nogil
|
228
|
+
cdef long mp_get_si(integer_class &i) nogil
|
229
|
+
cdef double mp_get_d(integer_class &i) nogil
|
230
|
+
cdef RCP[const Integer] integer(int i) nogil
|
231
|
+
cdef RCP[const Integer] integer(integer_class i) nogil
|
232
|
+
int i_nth_root(const Ptr[RCP[Integer]] &r, const Integer &a, unsigned long int n) nogil
|
233
|
+
bool perfect_square(const Integer &n) nogil
|
234
|
+
bool perfect_power(const Integer &n) nogil
|
235
|
+
|
236
|
+
cdef extern from "<symengine/rational.h>" namespace "SymEngine":
|
237
|
+
cdef cppclass Rational(Number):
|
238
|
+
rational_class as_rational_class() nogil
|
239
|
+
@staticmethod
|
240
|
+
RCP[const Number] from_two_ints(const long n, const long d) nogil
|
241
|
+
cdef double mp_get_d(rational_class &i) nogil
|
242
|
+
cdef RCP[const Number] from_mpq "SymEngine::Rational::from_mpq"(rational_class r) nogil
|
243
|
+
cdef void get_num_den(const Rational &rat, const Ptr[RCP[Integer]] &num,
|
244
|
+
const Ptr[RCP[Integer]] &den) nogil
|
245
|
+
cdef RCP[const Number] rational(long n, long d) nogil
|
246
|
+
|
247
|
+
cdef extern from "<symengine/complex.h>" namespace "SymEngine":
|
248
|
+
cdef cppclass ComplexBase(Number):
|
249
|
+
RCP[const Number] real_part() nogil
|
250
|
+
RCP[const Number] imaginary_part() nogil
|
251
|
+
cdef cppclass Complex(ComplexBase):
|
252
|
+
pass
|
253
|
+
|
254
|
+
cdef extern from "<symengine/real_double.h>" namespace "SymEngine":
|
255
|
+
cdef cppclass RealDouble(Number):
|
256
|
+
RealDouble(double x) nogil
|
257
|
+
double as_double() nogil
|
258
|
+
RCP[const RealDouble] real_double(double d) nogil
|
259
|
+
|
260
|
+
cdef extern from "<symengine/complex_double.h>" namespace "SymEngine":
|
261
|
+
cdef cppclass ComplexDouble(ComplexBase):
|
262
|
+
ComplexDouble(double complex x) nogil
|
263
|
+
double complex as_complex_double() nogil
|
264
|
+
RCP[const ComplexDouble] complex_double(double complex d) nogil
|
265
|
+
|
266
|
+
cdef extern from "<symengine/constants.h>" namespace "SymEngine":
|
267
|
+
cdef cppclass Constant(Basic):
|
268
|
+
Constant(string name) nogil
|
269
|
+
string get_name() nogil
|
270
|
+
rcp_const_basic I
|
271
|
+
rcp_const_basic E
|
272
|
+
rcp_const_basic pi
|
273
|
+
rcp_const_basic GoldenRatio
|
274
|
+
rcp_const_basic Catalan
|
275
|
+
rcp_const_basic EulerGamma
|
276
|
+
rcp_const_basic Inf
|
277
|
+
rcp_const_basic ComplexInf
|
278
|
+
rcp_const_basic Nan
|
279
|
+
|
280
|
+
cdef extern from "<symengine/infinity.h>" namespace "SymEngine":
|
281
|
+
cdef cppclass Infty(Number):
|
282
|
+
pass
|
283
|
+
|
284
|
+
cdef extern from "<symengine/nan.h>" namespace "SymEngine":
|
285
|
+
cdef cppclass NaN(Number):
|
286
|
+
pass
|
287
|
+
|
288
|
+
cdef extern from "<symengine/add.h>" namespace "SymEngine":
|
289
|
+
cdef rcp_const_basic add(rcp_const_basic &a, rcp_const_basic &b) nogil except +
|
290
|
+
cdef rcp_const_basic sub(rcp_const_basic &a, rcp_const_basic &b) nogil except +
|
291
|
+
cdef rcp_const_basic add(const vec_basic &a) nogil except +
|
292
|
+
|
293
|
+
cdef cppclass Add(Basic):
|
294
|
+
void as_two_terms(const Ptr[RCP[Basic]] &a, const Ptr[RCP[Basic]] &b)
|
295
|
+
RCP[const Number] get_coef()
|
296
|
+
const umap_basic_num &get_dict()
|
297
|
+
|
298
|
+
cdef extern from "<symengine/mul.h>" namespace "SymEngine":
|
299
|
+
cdef rcp_const_basic mul(rcp_const_basic &a, rcp_const_basic &b) nogil except +
|
300
|
+
cdef rcp_const_basic div(rcp_const_basic &a, rcp_const_basic &b) nogil except +
|
301
|
+
cdef rcp_const_basic neg(rcp_const_basic &a) nogil except +
|
302
|
+
cdef rcp_const_basic mul(const vec_basic &a) nogil except +
|
303
|
+
|
304
|
+
cdef cppclass Mul(Basic):
|
305
|
+
void as_two_terms(const Ptr[RCP[Basic]] &a, const Ptr[RCP[Basic]] &b)
|
306
|
+
RCP[const Number] get_coef()
|
307
|
+
const map_basic_basic &get_dict()
|
308
|
+
cdef RCP[const Mul] mul_from_dict "SymEngine::Mul::from_dict"(RCP[const Number] coef, map_basic_basic &d) nogil
|
309
|
+
|
310
|
+
cdef extern from "<symengine/pow.h>" namespace "SymEngine":
|
311
|
+
cdef rcp_const_basic pow(rcp_const_basic &a, rcp_const_basic &b) nogil except +
|
312
|
+
cdef rcp_const_basic sqrt(rcp_const_basic &x) nogil except +
|
313
|
+
cdef rcp_const_basic exp(rcp_const_basic &x) nogil except +
|
314
|
+
|
315
|
+
cdef cppclass Pow(Basic):
|
316
|
+
rcp_const_basic get_base() nogil
|
317
|
+
rcp_const_basic get_exp() nogil
|
318
|
+
|
319
|
+
|
320
|
+
cdef extern from "<symengine/basic.h>" namespace "SymEngine":
|
321
|
+
# We need to specialize these for our classes:
|
322
|
+
rcp_const_basic make_rcp_Symbol "SymEngine::make_rcp<const SymEngine::Symbol>"(string name) nogil
|
323
|
+
rcp_const_basic make_rcp_Dummy "SymEngine::make_rcp<const SymEngine::Dummy>"() nogil
|
324
|
+
rcp_const_basic make_rcp_Dummy "SymEngine::make_rcp<const SymEngine::Dummy>"(string name) nogil
|
325
|
+
rcp_const_basic make_rcp_PySymbol "SymEngine::make_rcp<const SymEngine::PySymbol>"(string name, PyObject * pyobj, bool use_pickle) except +
|
326
|
+
rcp_const_basic make_rcp_Constant "SymEngine::make_rcp<const SymEngine::Constant>"(string name) nogil
|
327
|
+
rcp_const_basic make_rcp_Infty "SymEngine::make_rcp<const SymEngine::Infty>"(RCP[const Number] i) nogil
|
328
|
+
rcp_const_basic make_rcp_NaN "SymEngine::make_rcp<const SymEngine::NaN>"() nogil
|
329
|
+
rcp_const_basic make_rcp_Integer "SymEngine::make_rcp<const SymEngine::Integer>"(int i) nogil
|
330
|
+
rcp_const_basic make_rcp_Integer "SymEngine::make_rcp<const SymEngine::Integer>"(integer_class i) nogil
|
331
|
+
rcp_const_basic make_rcp_Subs "SymEngine::make_rcp<const SymEngine::Subs>"(rcp_const_basic arg, const map_basic_basic &x) nogil
|
332
|
+
rcp_const_basic make_rcp_Derivative "SymEngine::make_rcp<const SymEngine::Derivative>"(rcp_const_basic arg, const multiset_basic &x) nogil
|
333
|
+
rcp_const_basic make_rcp_FunctionWrapper "SymEngine::make_rcp<const SymEngine::FunctionWrapper>"(void* obj, string name, string hash_, const vec_basic &arg, \
|
334
|
+
void (*dec_ref)(void *), int (*comp)(void *, void *)) nogil
|
335
|
+
rcp_const_basic make_rcp_RealDouble "SymEngine::make_rcp<const SymEngine::RealDouble>"(double x) nogil
|
336
|
+
rcp_const_basic make_rcp_ComplexDouble "SymEngine::make_rcp<const SymEngine::ComplexDouble>"(double complex x) nogil
|
337
|
+
RCP[const PyModule] make_rcp_PyModule "SymEngine::make_rcp<const SymEngine::PyModule>"(PyObject* (*) (rcp_const_basic x) except +, \
|
338
|
+
rcp_const_basic (*)(PyObject*) except +, RCP[const Number] (*)(PyObject*, long bits) except +,
|
339
|
+
rcp_const_basic (*)(PyObject*, rcp_const_basic) except +) except +
|
340
|
+
rcp_const_basic make_rcp_PyNumber "SymEngine::make_rcp<const SymEngine::PyNumber>"(PyObject*, RCP[const PyModule] x) nogil
|
341
|
+
RCP[const PyFunctionClass] make_rcp_PyFunctionClass "SymEngine::make_rcp<const SymEngine::PyFunctionClass>"(PyObject* pyobject,
|
342
|
+
string name, RCP[const PyModule] pymodule) nogil
|
343
|
+
rcp_const_basic make_rcp_PyFunction "SymEngine::make_rcp<const SymEngine::PyFunction>" (const vec_basic &vec,
|
344
|
+
RCP[const PyFunctionClass] pyfunc_class, const PyObject* pyobject) nogil
|
345
|
+
|
346
|
+
cdef extern from "<symengine/functions.h>" namespace "SymEngine":
|
347
|
+
cdef rcp_const_basic sin(rcp_const_basic &arg) nogil except +
|
348
|
+
cdef rcp_const_basic cos(rcp_const_basic &arg) nogil except +
|
349
|
+
cdef rcp_const_basic tan(rcp_const_basic &arg) nogil except +
|
350
|
+
cdef rcp_const_basic cot(rcp_const_basic &arg) nogil except +
|
351
|
+
cdef rcp_const_basic csc(rcp_const_basic &arg) nogil except +
|
352
|
+
cdef rcp_const_basic sec(rcp_const_basic &arg) nogil except +
|
353
|
+
cdef rcp_const_basic asin(rcp_const_basic &arg) nogil except +
|
354
|
+
cdef rcp_const_basic acos(rcp_const_basic &arg) nogil except +
|
355
|
+
cdef rcp_const_basic atan(rcp_const_basic &arg) nogil except +
|
356
|
+
cdef rcp_const_basic acot(rcp_const_basic &arg) nogil except +
|
357
|
+
cdef rcp_const_basic acsc(rcp_const_basic &arg) nogil except +
|
358
|
+
cdef rcp_const_basic asec(rcp_const_basic &arg) nogil except +
|
359
|
+
cdef rcp_const_basic sinh(rcp_const_basic &arg) nogil except +
|
360
|
+
cdef rcp_const_basic cosh(rcp_const_basic &arg) nogil except +
|
361
|
+
cdef rcp_const_basic tanh(rcp_const_basic &arg) nogil except +
|
362
|
+
cdef rcp_const_basic coth(rcp_const_basic &arg) nogil except +
|
363
|
+
cdef rcp_const_basic csch(rcp_const_basic &arg) nogil except +
|
364
|
+
cdef rcp_const_basic sech(rcp_const_basic &arg) nogil except +
|
365
|
+
cdef rcp_const_basic asinh(rcp_const_basic &arg) nogil except +
|
366
|
+
cdef rcp_const_basic acosh(rcp_const_basic &arg) nogil except +
|
367
|
+
cdef rcp_const_basic atanh(rcp_const_basic &arg) nogil except +
|
368
|
+
cdef rcp_const_basic acoth(rcp_const_basic &arg) nogil except +
|
369
|
+
cdef rcp_const_basic acsch(rcp_const_basic &arg) nogil except +
|
370
|
+
cdef rcp_const_basic asech(rcp_const_basic &arg) nogil except +
|
371
|
+
cdef rcp_const_basic function_symbol(string name, const vec_basic &arg) nogil except +
|
372
|
+
cdef rcp_const_basic abs(rcp_const_basic &arg) nogil except +
|
373
|
+
cdef rcp_const_basic max(const vec_basic &arg) nogil except +
|
374
|
+
cdef rcp_const_basic min(const vec_basic &arg) nogil except +
|
375
|
+
cdef rcp_const_basic gamma(rcp_const_basic &arg) nogil except +
|
376
|
+
cdef rcp_const_basic atan2(rcp_const_basic &num, rcp_const_basic &den) nogil except +
|
377
|
+
cdef rcp_const_basic lambertw(rcp_const_basic &arg) nogil except +
|
378
|
+
cdef rcp_const_basic zeta(rcp_const_basic &s) nogil except +
|
379
|
+
cdef rcp_const_basic zeta(rcp_const_basic &s, rcp_const_basic &a) nogil except +
|
380
|
+
cdef rcp_const_basic dirichlet_eta(rcp_const_basic &s) nogil except +
|
381
|
+
cdef rcp_const_basic kronecker_delta(rcp_const_basic &i, rcp_const_basic &j) nogil except +
|
382
|
+
cdef rcp_const_basic levi_civita(const vec_basic &arg) nogil except +
|
383
|
+
cdef rcp_const_basic erf(rcp_const_basic &arg) nogil except +
|
384
|
+
cdef rcp_const_basic erfc(rcp_const_basic &arg) nogil except +
|
385
|
+
cdef rcp_const_basic lowergamma(rcp_const_basic &s, rcp_const_basic &x) nogil except +
|
386
|
+
cdef rcp_const_basic uppergamma(rcp_const_basic &s, rcp_const_basic &x) nogil except +
|
387
|
+
cdef rcp_const_basic loggamma(rcp_const_basic &arg) nogil except +
|
388
|
+
cdef rcp_const_basic beta(rcp_const_basic &x, rcp_const_basic &y) nogil except +
|
389
|
+
cdef rcp_const_basic polygamma(rcp_const_basic &n, rcp_const_basic &x) nogil except +
|
390
|
+
cdef rcp_const_basic digamma(rcp_const_basic &x) nogil except +
|
391
|
+
cdef rcp_const_basic trigamma(rcp_const_basic &x) nogil except +
|
392
|
+
cdef rcp_const_basic sign(rcp_const_basic &x) nogil except +
|
393
|
+
cdef rcp_const_basic floor(rcp_const_basic &x) nogil except +
|
394
|
+
cdef rcp_const_basic ceiling(rcp_const_basic &x) nogil except +
|
395
|
+
cdef rcp_const_basic conjugate(rcp_const_basic &x) nogil except +
|
396
|
+
cdef rcp_const_basic log(rcp_const_basic &x) nogil except +
|
397
|
+
cdef rcp_const_basic log(rcp_const_basic &x, rcp_const_basic &y) nogil except +
|
398
|
+
cdef rcp_const_basic unevaluated_expr(rcp_const_basic &x) nogil except +
|
399
|
+
|
400
|
+
cdef cppclass Function(Basic):
|
401
|
+
pass
|
402
|
+
|
403
|
+
cdef cppclass OneArgFunction(Function):
|
404
|
+
rcp_const_basic get_arg() nogil
|
405
|
+
|
406
|
+
cdef cppclass TrigFunction(OneArgFunction):
|
407
|
+
pass
|
408
|
+
|
409
|
+
cdef cppclass Sin(TrigFunction):
|
410
|
+
pass
|
411
|
+
|
412
|
+
cdef cppclass Cos(TrigFunction):
|
413
|
+
pass
|
414
|
+
|
415
|
+
cdef cppclass Tan(TrigFunction):
|
416
|
+
pass
|
417
|
+
|
418
|
+
cdef cppclass Cot(TrigFunction):
|
419
|
+
pass
|
420
|
+
|
421
|
+
cdef cppclass Csc(TrigFunction):
|
422
|
+
pass
|
423
|
+
|
424
|
+
cdef cppclass Sec(TrigFunction):
|
425
|
+
pass
|
426
|
+
|
427
|
+
cdef cppclass ASin(TrigFunction):
|
428
|
+
pass
|
429
|
+
|
430
|
+
cdef cppclass ACos(TrigFunction):
|
431
|
+
pass
|
432
|
+
|
433
|
+
cdef cppclass ATan(TrigFunction):
|
434
|
+
pass
|
435
|
+
|
436
|
+
cdef cppclass ACot(TrigFunction):
|
437
|
+
pass
|
438
|
+
|
439
|
+
cdef cppclass ACsc(TrigFunction):
|
440
|
+
pass
|
441
|
+
|
442
|
+
cdef cppclass ASec(TrigFunction):
|
443
|
+
pass
|
444
|
+
|
445
|
+
cdef cppclass HyperbolicFunction(OneArgFunction):
|
446
|
+
pass
|
447
|
+
|
448
|
+
cdef cppclass Sinh(HyperbolicFunction):
|
449
|
+
pass
|
450
|
+
|
451
|
+
cdef cppclass Cosh(HyperbolicFunction):
|
452
|
+
pass
|
453
|
+
|
454
|
+
cdef cppclass Tanh(HyperbolicFunction):
|
455
|
+
pass
|
456
|
+
|
457
|
+
cdef cppclass Coth(HyperbolicFunction):
|
458
|
+
pass
|
459
|
+
|
460
|
+
cdef cppclass Csch(HyperbolicFunction):
|
461
|
+
pass
|
462
|
+
|
463
|
+
cdef cppclass Sech(HyperbolicFunction):
|
464
|
+
pass
|
465
|
+
|
466
|
+
cdef cppclass ASinh(HyperbolicFunction):
|
467
|
+
pass
|
468
|
+
|
469
|
+
cdef cppclass ACosh(HyperbolicFunction):
|
470
|
+
pass
|
471
|
+
|
472
|
+
cdef cppclass ATanh(HyperbolicFunction):
|
473
|
+
pass
|
474
|
+
|
475
|
+
cdef cppclass ACoth(HyperbolicFunction):
|
476
|
+
pass
|
477
|
+
|
478
|
+
cdef cppclass ACsch(HyperbolicFunction):
|
479
|
+
pass
|
480
|
+
|
481
|
+
cdef cppclass ASech(HyperbolicFunction):
|
482
|
+
pass
|
483
|
+
|
484
|
+
cdef cppclass FunctionSymbol(Function):
|
485
|
+
string get_name() nogil
|
486
|
+
|
487
|
+
cdef cppclass FunctionWrapper(FunctionSymbol):
|
488
|
+
FunctionWrapper(void* obj, string name, string hash_, const vec_basic &arg, \
|
489
|
+
void (*dec_ref)(void *), int (*comp)(void *, void *))
|
490
|
+
void* get_object()
|
491
|
+
|
492
|
+
cdef cppclass Derivative(Basic):
|
493
|
+
Derivative(const rcp_const_basic &arg, const vec_basic &x) nogil
|
494
|
+
rcp_const_basic get_arg() nogil
|
495
|
+
multiset_basic get_symbols() nogil
|
496
|
+
|
497
|
+
cdef cppclass Subs(Basic):
|
498
|
+
Subs(const rcp_const_basic &arg, const map_basic_basic &x) nogil
|
499
|
+
rcp_const_basic get_arg() nogil
|
500
|
+
vec_basic get_variables() nogil
|
501
|
+
vec_basic get_point() nogil
|
502
|
+
|
503
|
+
cdef cppclass Abs(OneArgFunction):
|
504
|
+
pass
|
505
|
+
|
506
|
+
cdef cppclass Max(Function):
|
507
|
+
pass
|
508
|
+
|
509
|
+
cdef cppclass Min(Function):
|
510
|
+
pass
|
511
|
+
|
512
|
+
cdef cppclass Gamma(OneArgFunction):
|
513
|
+
pass
|
514
|
+
|
515
|
+
cdef cppclass ATan2(Function):
|
516
|
+
pass
|
517
|
+
|
518
|
+
cdef cppclass LambertW(OneArgFunction):
|
519
|
+
pass
|
520
|
+
|
521
|
+
cdef cppclass Zeta(Function):
|
522
|
+
pass
|
523
|
+
|
524
|
+
cdef cppclass Dirichlet_eta(OneArgFunction):
|
525
|
+
pass
|
526
|
+
|
527
|
+
cdef cppclass KroneckerDelta(Function):
|
528
|
+
pass
|
529
|
+
|
530
|
+
cdef cppclass LeviCivita(Function):
|
531
|
+
pass
|
532
|
+
|
533
|
+
cdef cppclass Erf(OneArgFunction):
|
534
|
+
pass
|
535
|
+
|
536
|
+
cdef cppclass Erfc(OneArgFunction):
|
537
|
+
pass
|
538
|
+
|
539
|
+
cdef cppclass LowerGamma(Function):
|
540
|
+
pass
|
541
|
+
|
542
|
+
cdef cppclass UpperGamma(Function):
|
543
|
+
pass
|
544
|
+
|
545
|
+
cdef cppclass LogGamma(OneArgFunction):
|
546
|
+
pass
|
547
|
+
|
548
|
+
cdef cppclass Beta(Function):
|
549
|
+
pass
|
550
|
+
|
551
|
+
cdef cppclass PolyGamma(Function):
|
552
|
+
pass
|
553
|
+
|
554
|
+
cdef cppclass Sign(OneArgFunction):
|
555
|
+
pass
|
556
|
+
|
557
|
+
cdef cppclass Floor(OneArgFunction):
|
558
|
+
pass
|
559
|
+
|
560
|
+
cdef cppclass Ceiling(OneArgFunction):
|
561
|
+
pass
|
562
|
+
|
563
|
+
cdef cppclass Conjugate(OneArgFunction):
|
564
|
+
pass
|
565
|
+
|
566
|
+
cdef cppclass UnevaluatedExpr(OneArgFunction):
|
567
|
+
pass
|
568
|
+
|
569
|
+
cdef cppclass Log(Function):
|
570
|
+
pass
|
571
|
+
|
572
|
+
cdef extern from "<symengine/real_mpfr.h>":
|
573
|
+
# These come from mpfr.h, but don't include mpfr.h to not break
|
574
|
+
# builds without mpfr
|
575
|
+
ctypedef struct __mpfr_struct:
|
576
|
+
pass
|
577
|
+
ctypedef __mpfr_struct mpfr_t[1]
|
578
|
+
ctypedef __mpfr_struct* mpfr_ptr
|
579
|
+
ctypedef const __mpfr_struct* mpfr_srcptr
|
580
|
+
ctypedef long mpfr_prec_t
|
581
|
+
ctypedef enum mpfr_rnd_t:
|
582
|
+
MPFR_RNDN
|
583
|
+
MPFR_RNDZ
|
584
|
+
MPFR_RNDU
|
585
|
+
MPFR_RNDD
|
586
|
+
MPFR_RNDA
|
587
|
+
MPFR_RNDF
|
588
|
+
MPFR_RNDNA
|
589
|
+
|
590
|
+
cdef extern from "<symengine/real_mpfr.h>" namespace "SymEngine":
|
591
|
+
cdef cppclass mpfr_class:
|
592
|
+
mpfr_class() nogil
|
593
|
+
mpfr_class(mpfr_prec_t prec) nogil
|
594
|
+
mpfr_class(string s, mpfr_prec_t prec, unsigned base) nogil
|
595
|
+
mpfr_class(mpfr_t m) nogil
|
596
|
+
mpfr_ptr get_mpfr_t() nogil
|
597
|
+
|
598
|
+
cdef cppclass RealMPFR(Number):
|
599
|
+
RealMPFR(mpfr_class) nogil
|
600
|
+
mpfr_class as_mpfr() nogil
|
601
|
+
mpfr_prec_t get_prec() nogil
|
602
|
+
|
603
|
+
RCP[const RealMPFR] real_mpfr(mpfr_class t) nogil
|
604
|
+
|
605
|
+
cdef extern from "<symengine/complex_mpc.h>":
|
606
|
+
# These come from mpc.h, but don't include mpc.h to not break
|
607
|
+
# builds without mpc
|
608
|
+
ctypedef struct __mpc_struct:
|
609
|
+
pass
|
610
|
+
ctypedef __mpc_struct mpc_t[1]
|
611
|
+
ctypedef __mpc_struct* mpc_ptr
|
612
|
+
ctypedef const __mpc_struct* mpc_srcptr
|
613
|
+
|
614
|
+
cdef extern from "<symengine/complex_mpc.h>" namespace "SymEngine":
|
615
|
+
cdef cppclass mpc_class:
|
616
|
+
mpc_class() nogil
|
617
|
+
mpc_class(mpfr_prec_t prec) nogil
|
618
|
+
mpc_class(mpc_t m) nogil
|
619
|
+
mpc_ptr get_mpc_t() nogil
|
620
|
+
mpc_class(string s, mpfr_prec_t prec, unsigned base) nogil
|
621
|
+
|
622
|
+
cdef cppclass ComplexMPC(ComplexBase):
|
623
|
+
ComplexMPC(mpc_class) nogil
|
624
|
+
mpc_class as_mpc() nogil
|
625
|
+
mpfr_prec_t get_prec() nogil
|
626
|
+
|
627
|
+
RCP[const ComplexMPC] complex_mpc(mpc_class t) nogil
|
628
|
+
|
629
|
+
cdef extern from "<symengine/matrix.h>" namespace "SymEngine":
|
630
|
+
cdef cppclass MatrixBase:
|
631
|
+
const unsigned nrows() nogil
|
632
|
+
const unsigned ncols() nogil
|
633
|
+
rcp_const_basic get(unsigned i, unsigned j) nogil
|
634
|
+
rcp_const_basic set(unsigned i, unsigned j, rcp_const_basic e) nogil
|
635
|
+
string __str__() nogil except +
|
636
|
+
bool eq(const MatrixBase &) nogil
|
637
|
+
rcp_const_basic det() nogil
|
638
|
+
void inv(MatrixBase &)
|
639
|
+
bool is_square() nogil
|
640
|
+
void add_matrix(const MatrixBase &other, MatrixBase &result) nogil
|
641
|
+
void mul_matrix(const MatrixBase &other, MatrixBase &result) nogil
|
642
|
+
void elementwise_mul_matrix(const MatrixBase &other, MatrixBase &result) nogil
|
643
|
+
void conjugate(MatrixBase &result) nogil
|
644
|
+
void conjugate_transpose(MatrixBase &result) nogil
|
645
|
+
void add_scalar(rcp_const_basic k, MatrixBase &result) nogil
|
646
|
+
void mul_scalar(rcp_const_basic k, MatrixBase &result) nogil
|
647
|
+
void transpose(MatrixBase &result) nogil
|
648
|
+
void submatrix(MatrixBase &result,
|
649
|
+
unsigned row_start, unsigned col_start,
|
650
|
+
unsigned row_end, unsigned col_end,
|
651
|
+
unsigned row_step, unsigned col_step) nogil
|
652
|
+
void LU(MatrixBase &L, MatrixBase &U) nogil
|
653
|
+
void LDL(MatrixBase &L, MatrixBase &D) nogil
|
654
|
+
void LU_solve(const MatrixBase &b, MatrixBase &x) nogil
|
655
|
+
void FFLU(MatrixBase &LU) nogil
|
656
|
+
void FFLDU(MatrixBase &L, MatrixBase &D, MatrixBase &U) nogil
|
657
|
+
void QR(MatrixBase &Q, MatrixBase &R) nogil
|
658
|
+
void cholesky(MatrixBase &L) nogil
|
659
|
+
|
660
|
+
cdef cppclass DenseMatrix(MatrixBase):
|
661
|
+
DenseMatrix()
|
662
|
+
DenseMatrix(unsigned i, unsigned j) nogil
|
663
|
+
DenseMatrix(unsigned i, unsigned j, const vec_basic &v) nogil
|
664
|
+
void resize(unsigned i, unsigned j) nogil
|
665
|
+
void row_join(const DenseMatrix &B) nogil
|
666
|
+
void col_join(const DenseMatrix &B) nogil
|
667
|
+
void row_insert(const DenseMatrix &B, unsigned pos) nogil
|
668
|
+
void col_insert(const DenseMatrix &B, unsigned pos) nogil
|
669
|
+
void row_del(unsigned k) nogil
|
670
|
+
void col_del(unsigned k) nogil
|
671
|
+
rcp_const_basic trace() nogil
|
672
|
+
tribool is_zero() nogil
|
673
|
+
tribool is_real() nogil
|
674
|
+
tribool is_diagonal() nogil
|
675
|
+
tribool is_symmetric() nogil
|
676
|
+
tribool is_hermitian() nogil
|
677
|
+
tribool is_weakly_diagonally_dominant() nogil
|
678
|
+
tribool is_strictly_diagonally_dominant() nogil
|
679
|
+
tribool is_positive_definite() nogil
|
680
|
+
tribool is_negative_definite() nogil
|
681
|
+
|
682
|
+
DenseMatrix* static_cast_DenseMatrix "static_cast<SymEngine::DenseMatrix*>"(const MatrixBase *a)
|
683
|
+
void inverse_FFLU "SymEngine::inverse_fraction_free_LU"(const DenseMatrix &A,
|
684
|
+
DenseMatrix &B) nogil except +
|
685
|
+
void pivoted_LU_solve (const DenseMatrix &A, const DenseMatrix &b, DenseMatrix &x) nogil except +
|
686
|
+
void inverse_GJ "SymEngine::inverse_gauss_jordan"(const DenseMatrix &A,
|
687
|
+
DenseMatrix &B) nogil except +
|
688
|
+
void FFLU_solve "SymEngine::fraction_free_LU_solve"(const DenseMatrix &A,
|
689
|
+
const DenseMatrix &b, DenseMatrix &x) nogil except +
|
690
|
+
void FFGJ_solve "SymEngine::fraction_free_gauss_jordan_solve"(const DenseMatrix &A,
|
691
|
+
const DenseMatrix &b, DenseMatrix &x) nogil except +
|
692
|
+
void LDL_solve "SymEngine::LDL_solve"(const DenseMatrix &A, const DenseMatrix &b,
|
693
|
+
DenseMatrix &x) nogil except +
|
694
|
+
void jacobian "SymEngine::sjacobian"(const DenseMatrix &A,
|
695
|
+
const DenseMatrix &x, DenseMatrix &result) nogil except +
|
696
|
+
void diff "SymEngine::sdiff"(const DenseMatrix &A,
|
697
|
+
rcp_const_basic &x, DenseMatrix &result) nogil except +
|
698
|
+
void eye (DenseMatrix &A, int k) nogil
|
699
|
+
void diag(DenseMatrix &A, vec_basic &v, int k) nogil
|
700
|
+
void ones(DenseMatrix &A) nogil
|
701
|
+
void zeros(DenseMatrix &A) nogil
|
702
|
+
void row_exchange_dense(DenseMatrix &A, unsigned i, unsigned j) nogil
|
703
|
+
void row_mul_scalar_dense(DenseMatrix &A, unsigned i, rcp_const_basic &c) nogil
|
704
|
+
void row_add_row_dense(DenseMatrix &A, unsigned i, unsigned j, rcp_const_basic &c) nogil
|
705
|
+
void column_exchange_dense(DenseMatrix &A, unsigned i, unsigned j) nogil
|
706
|
+
void dot(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) nogil
|
707
|
+
void cross(const DenseMatrix &A, const DenseMatrix &B, DenseMatrix &C) nogil
|
708
|
+
|
709
|
+
cdef extern from "<symengine/matrix.h>":
|
710
|
+
void pivoted_LU (const DenseMatrix &A, DenseMatrix &L, DenseMatrix &U, vector[pair[int, int]] &P) nogil except +
|
711
|
+
|
712
|
+
cdef extern from "<symengine/ntheory.h>" namespace "SymEngine":
|
713
|
+
int probab_prime_p(const Integer &a, int reps)
|
714
|
+
RCP[const Integer] nextprime (const Integer &a) nogil
|
715
|
+
RCP[const Integer] gcd(const Integer &a, const Integer &b) nogil
|
716
|
+
RCP[const Integer] lcm(const Integer &a, const Integer &b) nogil
|
717
|
+
void gcd_ext(const Ptr[RCP[Integer]] &g, const Ptr[RCP[Integer]] &s,
|
718
|
+
const Ptr[RCP[Integer]] &t, const Integer &a, const Integer &b) nogil
|
719
|
+
RCP[const Integer] mod "SymEngine::mod_f"(const Integer &n, const Integer &d) nogil except +
|
720
|
+
RCP[const Integer] quotient "SymEngine::quotient_f"(const Integer &n, const Integer &d) nogil except +
|
721
|
+
void quotient_mod "SymEngine::quotient_mod_f"(const Ptr[RCP[Integer]] &q, const Ptr[RCP[Integer]] &mod,
|
722
|
+
const Integer &n, const Integer &d) nogil except +
|
723
|
+
int mod_inverse(const Ptr[RCP[Integer]] &b, const Integer &a,
|
724
|
+
const Integer &m) nogil
|
725
|
+
bool crt(const Ptr[RCP[Integer]] &R, const vec_integer &rem,
|
726
|
+
const vec_integer &mod) nogil
|
727
|
+
RCP[const Integer] fibonacci(unsigned long n) nogil
|
728
|
+
void fibonacci2(const Ptr[RCP[Integer]] &g, const Ptr[RCP[Integer]] &s,
|
729
|
+
unsigned long n) nogil
|
730
|
+
RCP[const Integer] lucas(unsigned long n) nogil
|
731
|
+
void lucas2(const Ptr[RCP[Integer]] &g, const Ptr[RCP[Integer]] &s,
|
732
|
+
unsigned long n) nogil
|
733
|
+
RCP[const Integer] binomial(const Integer &n,unsigned long k) nogil
|
734
|
+
RCP[const Integer] factorial(unsigned long n) nogil
|
735
|
+
bool divides(const Integer &a, const Integer &b) nogil
|
736
|
+
int factor(const Ptr[RCP[Integer]] &f, const Integer &n, double B1) nogil
|
737
|
+
int factor_lehman_method(const Ptr[RCP[Integer]] &f, const Integer &n) nogil
|
738
|
+
int factor_pollard_pm1_method(const Ptr[RCP[Integer]] &f, const Integer &n,
|
739
|
+
unsigned B, unsigned retries) nogil
|
740
|
+
int factor_pollard_rho_method(const Ptr[RCP[Integer]] &f, const Integer &n,
|
741
|
+
unsigned retries) nogil
|
742
|
+
void prime_factors(vec_integer &primes, const Integer &n) nogil except +
|
743
|
+
void prime_factor_multiplicities(map_integer_uint &primes, const Integer &n) nogil except +
|
744
|
+
RCP[const Number] bernoulli(unsigned long n) nogil except +
|
745
|
+
bool primitive_root(const Ptr[RCP[Integer]] &g, const Integer &n) nogil
|
746
|
+
void primitive_root_list(vec_integer &roots, const Integer &n) nogil
|
747
|
+
RCP[const Integer] totient(RCP[const Integer] n) nogil
|
748
|
+
RCP[const Integer] carmichael(RCP[const Integer] n) nogil
|
749
|
+
bool multiplicative_order(const Ptr[RCP[Integer]] &o, RCP[const Integer] a,
|
750
|
+
RCP[const Integer] n) nogil
|
751
|
+
int legendre(const Integer &a, const Integer &n) nogil
|
752
|
+
int jacobi(const Integer &a, const Integer &n) nogil
|
753
|
+
int kronecker(const Integer &a, const Integer &n) nogil
|
754
|
+
void nthroot_mod_list(vec_integer &roots, RCP[const Integer] n,
|
755
|
+
RCP[const Integer] a, RCP[const Integer] m) nogil
|
756
|
+
bool nthroot_mod(const Ptr[RCP[Integer]] &root, RCP[const Integer] n,
|
757
|
+
RCP[const Integer] a, RCP[const Integer] m) nogil
|
758
|
+
bool powermod(const Ptr[RCP[Integer]] &powm, RCP[const Integer] a,
|
759
|
+
RCP[const Number] b, RCP[const Integer] m) nogil
|
760
|
+
void powermod_list(vec_integer &powm, RCP[const Integer] a,
|
761
|
+
RCP[const Number] b, RCP[const Integer] m) nogil
|
762
|
+
|
763
|
+
cdef extern from "<symengine/prime_sieve.h>" namespace "SymEngine":
|
764
|
+
void sieve_generate_primes "SymEngine::Sieve::generate_primes"(vector[unsigned] &primes, unsigned limit) nogil
|
765
|
+
|
766
|
+
cdef cppclass sieve_iterator "SymEngine::Sieve::iterator":
|
767
|
+
sieve_iterator()
|
768
|
+
sieve_iterator(unsigned limit) nogil
|
769
|
+
unsigned next_prime() nogil
|
770
|
+
|
771
|
+
cdef extern from "<symengine/visitor.h>" namespace "SymEngine":
|
772
|
+
bool has_symbol(const Basic &b, const Basic &x) nogil except +
|
773
|
+
rcp_const_basic coeff(const Basic &b, const Basic &x, const Basic &n) nogil except +
|
774
|
+
set_basic free_symbols(const Basic &b) nogil except +
|
775
|
+
set_basic free_symbols(const MatrixBase &b) nogil except +
|
776
|
+
unsigned count_ops(const vec_basic &a) nogil
|
777
|
+
|
778
|
+
cdef extern from "<symengine/logic.h>" namespace "SymEngine":
|
779
|
+
cdef cppclass Boolean(Basic):
|
780
|
+
RCP[const Boolean] logical_not() nogil except +
|
781
|
+
cdef cppclass BooleanAtom(Boolean):
|
782
|
+
bool get_val() nogil
|
783
|
+
cdef cppclass Relational(Boolean):
|
784
|
+
pass
|
785
|
+
cdef cppclass Equality(Relational):
|
786
|
+
pass
|
787
|
+
cdef cppclass Unequality(Relational):
|
788
|
+
pass
|
789
|
+
cdef cppclass LessThan(Relational):
|
790
|
+
pass
|
791
|
+
cdef cppclass StrictLessThan(Relational):
|
792
|
+
pass
|
793
|
+
cdef cppclass Piecewise(Basic):
|
794
|
+
pass
|
795
|
+
cdef cppclass Contains(Boolean):
|
796
|
+
pass
|
797
|
+
cdef cppclass And(Boolean):
|
798
|
+
pass
|
799
|
+
cdef cppclass Or(Boolean):
|
800
|
+
pass
|
801
|
+
cdef cppclass Not(Boolean):
|
802
|
+
pass
|
803
|
+
cdef cppclass Xor(Boolean):
|
804
|
+
pass
|
805
|
+
|
806
|
+
rcp_const_basic boolTrue
|
807
|
+
rcp_const_basic boolFalse
|
808
|
+
cdef RCP[const Boolean] Eq(rcp_const_basic &lhs) nogil except +
|
809
|
+
cdef RCP[const Boolean] Eq(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
810
|
+
cdef RCP[const Boolean] Ne(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
811
|
+
cdef RCP[const Boolean] Ge(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
812
|
+
cdef RCP[const Boolean] Gt(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
813
|
+
cdef RCP[const Boolean] Le(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
814
|
+
cdef RCP[const Boolean] Lt(rcp_const_basic &lhs, rcp_const_basic &rhs) nogil except +
|
815
|
+
ctypedef Boolean const_Boolean "const SymEngine::Boolean"
|
816
|
+
ctypedef vector[pair[rcp_const_basic, RCP[const_Boolean]]] PiecewiseVec;
|
817
|
+
ctypedef vector[RCP[Boolean]] vec_boolean "SymEngine::vec_boolean"
|
818
|
+
ctypedef set[RCP[Boolean]] set_boolean "SymEngine::set_boolean"
|
819
|
+
cdef RCP[const Boolean] logical_and(set_boolean &s) nogil except +
|
820
|
+
cdef RCP[const Boolean] logical_nand(set_boolean &s) nogil except +
|
821
|
+
cdef RCP[const Boolean] logical_or(set_boolean &s) nogil except +
|
822
|
+
cdef RCP[const Boolean] logical_not(RCP[const Boolean] &s) nogil except +
|
823
|
+
cdef RCP[const Boolean] logical_nor(set_boolean &s) nogil except +
|
824
|
+
cdef RCP[const Boolean] logical_xor(vec_boolean &s) nogil except +
|
825
|
+
cdef RCP[const Boolean] logical_xnor(vec_boolean &s) nogil except +
|
826
|
+
cdef rcp_const_basic piecewise(PiecewiseVec vec) nogil except +
|
827
|
+
cdef RCP[const Boolean] contains(rcp_const_basic &expr,
|
828
|
+
RCP[const Set] &set) nogil
|
829
|
+
|
830
|
+
cdef extern from "<symengine/eval.h>" namespace "SymEngine":
|
831
|
+
cdef cppclass EvalfDomain:
|
832
|
+
pass
|
833
|
+
cdef EvalfDomain EvalfComplex "SymEngine::EvalfDomain::Complex"
|
834
|
+
cdef EvalfDomain EvalfReal "SymEngine::EvalfDomain::Real"
|
835
|
+
cdef EvalfDomain EvalfSymbolic "SymEngine::EvalfDomain::Symbolic"
|
836
|
+
rcp_const_basic evalf(const Basic &b, unsigned long bits, EvalfDomain domain) nogil except +
|
837
|
+
|
838
|
+
cdef extern from "<symengine/eval_double.h>" namespace "SymEngine":
|
839
|
+
double eval_double(const Basic &b) nogil except +
|
840
|
+
double complex eval_complex_double(const Basic &b) nogil except +
|
841
|
+
|
842
|
+
cdef extern from "<symengine/lambda_double.h>" namespace "SymEngine":
|
843
|
+
cdef cppclass LambdaRealDoubleVisitor:
|
844
|
+
LambdaRealDoubleVisitor() nogil
|
845
|
+
void init(const vec_basic &x, const vec_basic &b, bool cse) nogil except +
|
846
|
+
void call(double *r, const double *x) nogil
|
847
|
+
cdef cppclass LambdaComplexDoubleVisitor:
|
848
|
+
LambdaComplexDoubleVisitor() nogil
|
849
|
+
void init(const vec_basic &x, const vec_basic &b, bool cse) nogil except +
|
850
|
+
void call(double complex *r, const double complex *x) nogil
|
851
|
+
|
852
|
+
cdef extern from "<symengine/llvm_double.h>" namespace "SymEngine":
|
853
|
+
cdef cppclass LLVMVisitor:
|
854
|
+
LLVMVisitor() nogil
|
855
|
+
void init(const vec_basic &x, const vec_basic &b, bool cse, int opt_level) nogil except +
|
856
|
+
const string& dumps() nogil
|
857
|
+
void loads(const string&) nogil
|
858
|
+
|
859
|
+
cdef cppclass LLVMFloatVisitor(LLVMVisitor):
|
860
|
+
void call(float *r, const float *x) nogil
|
861
|
+
|
862
|
+
cdef cppclass LLVMDoubleVisitor(LLVMVisitor):
|
863
|
+
void call(double *r, const double *x) nogil
|
864
|
+
|
865
|
+
cdef cppclass LLVMLongDoubleVisitor(LLVMVisitor):
|
866
|
+
void call(long double *r, const long double *x) nogil
|
867
|
+
|
868
|
+
|
869
|
+
cdef extern from "<symengine/series.h>" namespace "SymEngine":
|
870
|
+
cdef cppclass SeriesCoeffInterface:
|
871
|
+
rcp_const_basic as_basic() nogil except +
|
872
|
+
umap_int_basic as_dict() nogil except +
|
873
|
+
rcp_const_basic get_coeff(int) nogil except +
|
874
|
+
ctypedef RCP[const SeriesCoeffInterface] rcp_const_seriescoeffinterface "SymEngine::RCP<const SymEngine::SeriesCoeffInterface>"
|
875
|
+
rcp_const_seriescoeffinterface series "SymEngine::series"(rcp_const_basic &ex, RCP[const Symbol] &var, unsigned int prec) nogil except +
|
876
|
+
|
877
|
+
cdef extern from "<symengine/eval_mpfr.h>" namespace "SymEngine":
|
878
|
+
void eval_mpfr(mpfr_t result, const Basic &b, mpfr_rnd_t rnd) nogil except +
|
879
|
+
|
880
|
+
cdef extern from "<symengine/eval_mpc.h>" namespace "SymEngine":
|
881
|
+
void eval_mpc(mpc_t result, const Basic &b, mpfr_rnd_t rnd) nogil except +
|
882
|
+
|
883
|
+
cdef extern from "<symengine/parser.h>" namespace "SymEngine":
|
884
|
+
rcp_const_basic parse(const string &n) nogil except +
|
885
|
+
|
886
|
+
cdef extern from "<symengine/sets.h>" namespace "SymEngine":
|
887
|
+
cdef cppclass Set(Basic):
|
888
|
+
RCP[const Set] set_intersection(RCP[const Set] &o) nogil except +
|
889
|
+
RCP[const Set] set_union(RCP[const Set] &o) nogil except +
|
890
|
+
RCP[const Set] set_complement(RCP[const Set] &o) nogil except +
|
891
|
+
RCP[const Boolean] contains(rcp_const_basic &a) nogil except +
|
892
|
+
cdef cppclass Interval(Set):
|
893
|
+
pass
|
894
|
+
cdef cppclass EmptySet(Set):
|
895
|
+
pass
|
896
|
+
cdef cppclass Reals(Set):
|
897
|
+
pass
|
898
|
+
cdef cppclass Rationals(Set):
|
899
|
+
pass
|
900
|
+
cdef cppclass Integers(Set):
|
901
|
+
pass
|
902
|
+
cdef cppclass UniversalSet(Set):
|
903
|
+
pass
|
904
|
+
cdef cppclass FiniteSet(Set):
|
905
|
+
pass
|
906
|
+
cdef cppclass Union(Set):
|
907
|
+
pass
|
908
|
+
cdef cppclass Complement(Set):
|
909
|
+
pass
|
910
|
+
cdef cppclass ConditionSet(Set):
|
911
|
+
pass
|
912
|
+
cdef cppclass ImageSet(Set):
|
913
|
+
pass
|
914
|
+
ctypedef set[RCP[Set]] set_set "SymEngine::set_set"
|
915
|
+
cdef rcp_const_basic interval(RCP[const Number] &start, RCP[const Number] &end, bool l, bool r) nogil except +
|
916
|
+
cdef RCP[const EmptySet] emptyset() nogil except +
|
917
|
+
cdef RCP[const Reals] reals() nogil except +
|
918
|
+
cdef RCP[const Rationals] rationals() nogil except +
|
919
|
+
cdef RCP[const Integers] integers() nogil except +
|
920
|
+
cdef RCP[const UniversalSet] universalset() nogil except +
|
921
|
+
cdef RCP[const Set] finiteset(set_basic &container) nogil except +
|
922
|
+
cdef RCP[const Set] set_union(set_set &a) nogil except +
|
923
|
+
cdef RCP[const Set] set_intersection(set_set &a) nogil except +
|
924
|
+
cdef RCP[const Set] set_complement_helper(RCP[const Set] &container, RCP[const Set] &universe) nogil except +
|
925
|
+
cdef RCP[const Set] set_complement(RCP[const Set] &universe, RCP[const Set] &container) nogil except +
|
926
|
+
cdef RCP[const Set] conditionset(rcp_const_basic &sym, RCP[const Boolean] &condition) nogil except +
|
927
|
+
cdef RCP[const Set] imageset(rcp_const_basic &sym, rcp_const_basic &expr, RCP[const Set] &base) nogil except +
|
928
|
+
|
929
|
+
cdef extern from "<symengine/solve.h>" namespace "SymEngine":
|
930
|
+
cdef RCP[const Set] solve(rcp_const_basic &f, RCP[const Symbol] &sym) nogil except +
|
931
|
+
cdef RCP[const Set] solve(rcp_const_basic &f, RCP[const Symbol] &sym, RCP[const Set] &domain) nogil except +
|
932
|
+
cdef vec_basic linsolve(const vec_basic &eqs, const vec_sym &syms) nogil except +
|
933
|
+
|
934
|
+
cdef extern from "symengine/tribool.h" namespace "SymEngine":
|
935
|
+
cdef cppclass tribool:
|
936
|
+
pass # tribool is an enum class
|
937
|
+
|
938
|
+
cdef bool is_true(tribool) nogil
|
939
|
+
cdef bool is_false(tribool) nogil
|
940
|
+
cdef bool is_indeterminate(tribool) nogil
|
941
|
+
|
942
|
+
cdef extern from "symengine/tribool.h" namespace "SymEngine::tribool":
|
943
|
+
cdef tribool indeterminate
|
944
|
+
cdef tribool trifalse
|
945
|
+
cdef tribool tritrue
|
946
|
+
|
947
|
+
cdef extern from "<symengine/printers.h>" namespace "SymEngine":
|
948
|
+
string ccode(const Basic &x) nogil except +
|
949
|
+
string latex(const Basic &x) nogil except +
|
950
|
+
string latex(const DenseMatrix &x, unsigned max_rows, unsigned max_cols) nogil except +
|
951
|
+
string unicode(const Basic &x) nogil except +
|
952
|
+
|
953
|
+
## Defined in 'symengine/cwrapper.cpp'
|
954
|
+
cdef struct CRCPBasic:
|
955
|
+
rcp_const_basic m
|