Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
2094cd11
Commit
2094cd11
authored
Mar 26, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the first implemented integral rules to operator-match map.
parent
985b588e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/rules/__init__.py
src/rules/__init__.py
+5
-1
src/rules/integrals.py
src/rules/integrals.py
+1
-1
No files found.
src/rules/__init__.py
View file @
2094cd11
from
..node
import
OP_ADD
,
OP_MUL
,
OP_DIV
,
OP_POW
,
OP_NEG
,
OP_SIN
,
OP_COS
,
\
from
..node
import
OP_ADD
,
OP_MUL
,
OP_DIV
,
OP_POW
,
OP_NEG
,
OP_SIN
,
OP_COS
,
\
OP_TAN
,
OP_DER
,
OP_LOG
OP_TAN
,
OP_DER
,
OP_LOG
,
OP_INT
,
OP_INT_INDEF
from
.groups
import
match_combine_groups
from
.groups
import
match_combine_groups
from
.factors
import
match_expand
from
.factors
import
match_expand
from
.powers
import
match_add_exponents
,
match_subtract_exponents
,
\
from
.powers
import
match_add_exponents
,
match_subtract_exponents
,
\
...
@@ -24,6 +24,8 @@ from src.rules.derivatives import match_zero_derivative, \
...
@@ -24,6 +24,8 @@ from src.rules.derivatives import match_zero_derivative, \
from
src.rules.logarithmic
import
match_constant_logarithm
,
\
from
src.rules.logarithmic
import
match_constant_logarithm
,
\
match_add_logarithms
,
match_raised_base
,
match_factor_out_exponent
,
\
match_add_logarithms
,
match_raised_base
,
match_factor_out_exponent
,
\
match_factor_in_multiplicant
match_factor_in_multiplicant
from
src.rules.integrals
import
match_solve_indef
,
\
match_integrate_variable_power
RULES
=
{
RULES
=
{
OP_ADD
:
[
match_add_numerics
,
match_add_constant_fractions
,
OP_ADD
:
[
match_add_numerics
,
match_add_constant_fractions
,
...
@@ -53,4 +55,6 @@ RULES = {
...
@@ -53,4 +55,6 @@ RULES = {
match_logarithmic
,
match_goniometric
,
match_sum_product_rule
,
match_logarithmic
,
match_goniometric
,
match_sum_product_rule
,
match_quotient_rule
],
match_quotient_rule
],
OP_LOG
:
[
match_constant_logarithm
,
match_factor_out_exponent
],
OP_LOG
:
[
match_constant_logarithm
,
match_factor_out_exponent
],
OP_INT
:
[
match_integrate_variable_power
],
OP_INT_INDEF
:
[
match_solve_indef
],
}
}
src/rules/integrals.py
View file @
2094cd11
...
@@ -87,7 +87,7 @@ def match_integrate_variable_power(node):
...
@@ -87,7 +87,7 @@ def match_integrate_variable_power(node):
"""
"""
assert
node
.
is_op
(
OP_INT
)
assert
node
.
is_op
(
OP_INT
)
f
,
x
=
node
f
,
x
=
node
[:
2
]
if
f
.
is_power
():
if
f
.
is_power
():
root
,
exponent
=
f
root
,
exponent
=
f
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment