Added option to stop the simplyify_homogeneous with linear equations.
authorAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Wed, 5 Dec 2018 16:21:14 +0000 (17:21 +0100)
committerAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Wed, 5 Dec 2018 16:21:14 +0000 (17:21 +0100)
ajpastor/dd_functions/toDiffAlgebraic.py
releases/diff_defined_functions__0.6.zip
releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip [new file with mode: 0644]

index 60d4013..d2d906a 100644 (file)
@@ -562,7 +562,7 @@ def build_initial_from_homogeneous(init, n, depth, base):
     return build_initial_from_homogeneous(tuple(new_init), n, depth-1, base);
 
 @cached_function
-def simplify_homogeneous(poly):
+def simplify_homogeneous(poly, _stop_linear=True):
     '''
         Given an homogeneous differential polynomial 'poly', we reduce the order of the equation by 1
         using the change of variables y(x) = exp(int(u(x))).
@@ -574,7 +574,7 @@ def simplify_homogeneous(poly):
     poly = fromFinitePolynomial_toInfinitePolynomial(poly);
     parent = poly.parent(); y = parent.gens()[0];
     
-    if(not(poly.is_homogeneous()) or (poly.degree() == 1)):
+    if(not(poly.is_homogeneous()) or (_stop_linear and poly.degree() == 1)):
         return (poly,0);
     
     d = {str(y[0]) : parent.one()};
index d943b0b..7ab871f 100644 (file)
Binary files a/releases/diff_defined_functions__0.6.zip and b/releases/diff_defined_functions__0.6.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip b/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip
new file mode 100644 (file)
index 0000000..7ab871f
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.12.05_17:21:14.zip differ