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
e6d56762
Commit
e6d56762
authored
Feb 20, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added numeric matches and removed polynome matches.
parent
1453c1cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
src/rules/__init__.py
src/rules/__init__.py
+7
-8
No files found.
src/rules/__init__.py
View file @
e6d56762
from
..node
import
OP_ADD
,
OP_MUL
,
OP_DIV
,
OP_POW
,
OP_NEG
from
.poly
import
match_combine_polynomes
from
.groups
import
match_combine_groups
from
.factors
import
match_expand
from
.powers
import
match_add_exponents
,
match_subtract_exponents
,
\
match_multiply_exponents
,
match_duplicate_exponent
,
\
match_remove_negative_exponent
,
match_exponent_to_root
,
\
match_extend_exponent
from
.numerics
import
match_
divide_numerics
,
match_multiply
_numerics
,
\
match_multiply_zero
from
.numerics
import
match_
add_numerics
,
match_divide
_numerics
,
\
match_multiply_
numerics
,
match_multiply_
zero
from
.fractions
import
match_constant_division
,
match_add_constant_fractions
,
\
match_expand_and_add_fractions
from
.negation
import
match_negated_factor
,
match_negate_polynome
,
\
match_negated_division
RULES
=
{
OP_ADD
:
[
match_add_
constant_fractions
,
match_combine_polynomes
,
\
OP_ADD
:
[
match_add_
numerics
,
match_add_constant_fractions
,
match_combine_groups
],
OP_MUL
:
[
match_multiply_numerics
,
match_expand
,
match_add_exponents
,
\
OP_MUL
:
[
match_multiply_numerics
,
match_expand
,
match_add_exponents
,
match_expand_and_add_fractions
,
match_multiply_zero
,
match_negated_factor
],
OP_DIV
:
[
match_subtract_exponents
,
match_divide_numerics
,
\
OP_DIV
:
[
match_subtract_exponents
,
match_divide_numerics
,
match_constant_division
,
match_negated_division
],
OP_POW
:
[
match_multiply_exponents
,
match_duplicate_exponent
,
\
match_remove_negative_exponent
,
match_exponent_to_root
,
\
OP_POW
:
[
match_multiply_exponents
,
match_duplicate_exponent
,
match_remove_negative_exponent
,
match_exponent_to_root
,
match_extend_exponent
],
OP_NEG
:
[
match_negate_polynome
],
}
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