Quellcode durchsuchen

Added numeric matches and removed polynome matches.

Taddeus Kroes vor 14 Jahren
Ursprung
Commit
e6d56762e8
1 geänderte Dateien mit 7 neuen und 8 gelöschten Zeilen
  1. 7 8
      src/rules/__init__.py

+ 7 - 8
src/rules/__init__.py

@@ -1,28 +1,27 @@
 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],
         }