Changed version to 0.6 (since addition of file toDiffAlgebraic.py)
authorAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Tue, 25 Sep 2018 15:51:08 +0000 (17:51 +0200)
committerAntonio Jimenez Pastor <antonio@ebook.dk-compmath.jku.at>
Tue, 25 Sep 2018 15:51:08 +0000 (17:51 +0200)
Renamed previous releases to fit with the version

Fixed two errors:
    - Function sequence from ring_w_sequence.py now allows Symbolic Expressions as input
    - Functions __rsub__ and __rdiv__ now work properly (previously returned wrong results (inversed))

33 files changed:
ajpastor/dd_functions/ddFunction.py
ajpastor/misc/ring_w_sequence.py
package-version.txt
releases/diff_defined_functions__0.5.zip
releases/diff_defined_functions__0.6.zip [new file with mode: 0644]
releases/old/.directory [new file with mode: 0644]
releases/old/diff_defined_functions__0.5__18.08.28_19:14:05.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.08.29_19:31:34.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.08.30_15:39:48.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.03_15:56:33.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.04_16:36:11.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.05_11:25:00.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.11_17:24:39.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.12_16:55:06.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.13_18:09:17.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.14_14:49:25.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.19_10:00:20.zip [deleted file]
releases/old/diff_defined_functions__0.5__18.09.20_17:21:47.zip [deleted file]
releases/old/diff_defined_functions__0.6__18.08.28_19:14:05.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.08.29_19:31:34.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.08.30_15:39:48.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.03_15:56:33.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.04_16:36:11.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.05_11:25:00.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.11_17:24:39.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.12_16:55:06.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.13_18:09:17.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.14_14:49:25.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.19_10:00:20.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.20_17:21:47.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.25_17:45:42.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.25_17:46:26.zip [new file with mode: 0644]
releases/old/diff_defined_functions__0.6__18.09.25_17:51:08.zip [new file with mode: 0644]

index aa3dbc6..59f1415 100644 (file)
@@ -2,6 +2,7 @@
 from sage.all_cmdline import *   # import sage library
 
 _sage_const_1en10 = RealNumber('1e-10');
+_sage_const_0 = Integer(0);
 
 # Python imports
 import warnings;
@@ -59,7 +60,7 @@ def _aux_derivation(p):
         R = p.parent();
         return derivative(p,R(x));
     except Exception:
-        return 0 ;
+        return _sage_const_0 ;
         
 #####################################################
 ### Class for DD-Rings
@@ -499,6 +500,7 @@ class DDRing (Ring_w_Sequence, IntegralDomain):
                                 
                     dnum = self.base_derivation(num); dden = self.base_derivation(den);
                     el = self.element([dden*num - dnum*den, num*den]);
+                    X = num/den;
                     name = str(X);
                     try:
                         name = X._DDFunction__name;
@@ -509,6 +511,7 @@ class DDRing (Ring_w_Sequence, IntegralDomain):
                     try:
                         return self.element([1 ],[], self.base()(X), name=str(X));
                     except Exception:
+                        print "WHAT??";
                         return self(str(element));
         except TypeError as e:
             raise TypeError("Cannot cast an element to a DD-Function of (%s):\n\tElement: %s (%s)\n\tReason: %s" %(self, X, type(X), e));
@@ -1381,7 +1384,7 @@ class DDFunction (IntegralDomainElement):
         '''
         ### We check some simplifications: if one of the functions is zero, then we can return directly 0
         if ((other.is_null) or (self.is_null)):
-            return 0 ;
+            return _sage_const_0 ;
         if(self.is_one):
             return other;
         elif(other.is_one):
@@ -1894,13 +1897,13 @@ class DDFunction (IntegralDomainElement):
         return super(DDFunction,self).__add__(self.__check_symbolic(other));
         
     def __rsub__(self, other):
-        return super(DDFunction,self).__sub__(self.__check_symbolic(other));
+        return (-self) + self.__check_symbolic(other);
         
     def __rmul__(self, other):
         return super(DDFunction,self).__mul__(self.__check_symbolic(other));
         
     def __rdiv__(self, other):
-        return super(DDFunction,self).__div__(self.__check_symbolic(other));
+        return self.inverse * self.__check_symbolic(other);
         
     def __iadd__(self, other):
         return super(DDFunction,self).__add__(self.__check_symbolic(other));
@@ -2032,7 +2035,7 @@ class DDFunction (IntegralDomainElement):
         '''
             Missing method for DDFuntions.
         '''
-        return 0 ;
+        return _sage_const_0 ;
         
     def __str__(self, detail=True):
         '''
@@ -2510,7 +2513,7 @@ def _get_initial_poly(poly, dic, m):
     ## Constant case
     if(poly.is_constant()):
         if(m > 0):
-            return 0;
+            return _sage_const_0;
         return poly.parent().base()(poly);
     
     ## Non-constant polynomial
index cabffdb..1d5bb7e 100644 (file)
@@ -93,6 +93,9 @@ class Wrap_w_Sequence_Ring (Ring_w_Sequence):
 
 def sequence(el, n):
     R = el.parent();
+    if(sage.symbolic.ring.is_SymbolicExpressionRing(R)):
+        variable = el.variables()[0];
+        return el.derivative(variable,n)(**{str(variable):0})/factorial(n);
     if(not isinstance(R, Ring_w_Sequence)):
         R = Wrap_w_Sequence_Ring(R);
         
index 2eb3c4f..5a2a580 100644 (file)
@@ -1 +1 @@
-0.5
+0.6
index 221e173..e7b8dd5 100644 (file)
Binary files a/releases/diff_defined_functions__0.5.zip and b/releases/diff_defined_functions__0.5.zip differ
diff --git a/releases/diff_defined_functions__0.6.zip b/releases/diff_defined_functions__0.6.zip
new file mode 100644 (file)
index 0000000..dedf9cc
Binary files /dev/null and b/releases/diff_defined_functions__0.6.zip differ
diff --git a/releases/old/.directory b/releases/old/.directory
new file mode 100644 (file)
index 0000000..c156c90
--- /dev/null
@@ -0,0 +1,4 @@
+[Dolphin]
+Timestamp=2018,9,25,17,47,48
+Version=3
+ViewMode=2
diff --git a/releases/old/diff_defined_functions__0.5__18.08.28_19:14:05.zip b/releases/old/diff_defined_functions__0.5__18.08.28_19:14:05.zip
deleted file mode 100644 (file)
index aa554ee..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.08.28_19:14:05.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.08.29_19:31:34.zip b/releases/old/diff_defined_functions__0.5__18.08.29_19:31:34.zip
deleted file mode 100644 (file)
index 44dd984..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.08.29_19:31:34.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.08.30_15:39:48.zip b/releases/old/diff_defined_functions__0.5__18.08.30_15:39:48.zip
deleted file mode 100644 (file)
index fe3cab3..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.08.30_15:39:48.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.03_15:56:33.zip b/releases/old/diff_defined_functions__0.5__18.09.03_15:56:33.zip
deleted file mode 100644 (file)
index 3ea93cf..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.03_15:56:33.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.04_16:36:11.zip b/releases/old/diff_defined_functions__0.5__18.09.04_16:36:11.zip
deleted file mode 100644 (file)
index 99472a3..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.04_16:36:11.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.05_11:25:00.zip b/releases/old/diff_defined_functions__0.5__18.09.05_11:25:00.zip
deleted file mode 100644 (file)
index b255822..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.05_11:25:00.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.11_17:24:39.zip b/releases/old/diff_defined_functions__0.5__18.09.11_17:24:39.zip
deleted file mode 100644 (file)
index 3509c98..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.11_17:24:39.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.12_16:55:06.zip b/releases/old/diff_defined_functions__0.5__18.09.12_16:55:06.zip
deleted file mode 100644 (file)
index 3f2414d..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.12_16:55:06.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.13_18:09:17.zip b/releases/old/diff_defined_functions__0.5__18.09.13_18:09:17.zip
deleted file mode 100644 (file)
index 3bfd8b3..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.13_18:09:17.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.14_14:49:25.zip b/releases/old/diff_defined_functions__0.5__18.09.14_14:49:25.zip
deleted file mode 100644 (file)
index aee1251..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.14_14:49:25.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.19_10:00:20.zip b/releases/old/diff_defined_functions__0.5__18.09.19_10:00:20.zip
deleted file mode 100644 (file)
index 914736f..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.19_10:00:20.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.5__18.09.20_17:21:47.zip b/releases/old/diff_defined_functions__0.5__18.09.20_17:21:47.zip
deleted file mode 100644 (file)
index 221e173..0000000
Binary files a/releases/old/diff_defined_functions__0.5__18.09.20_17:21:47.zip and /dev/null differ
diff --git a/releases/old/diff_defined_functions__0.6__18.08.28_19:14:05.zip b/releases/old/diff_defined_functions__0.6__18.08.28_19:14:05.zip
new file mode 100644 (file)
index 0000000..aa554ee
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.08.28_19:14:05.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.08.29_19:31:34.zip b/releases/old/diff_defined_functions__0.6__18.08.29_19:31:34.zip
new file mode 100644 (file)
index 0000000..44dd984
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.08.29_19:31:34.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.08.30_15:39:48.zip b/releases/old/diff_defined_functions__0.6__18.08.30_15:39:48.zip
new file mode 100644 (file)
index 0000000..fe3cab3
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.08.30_15:39:48.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.03_15:56:33.zip b/releases/old/diff_defined_functions__0.6__18.09.03_15:56:33.zip
new file mode 100644 (file)
index 0000000..3ea93cf
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.03_15:56:33.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.04_16:36:11.zip b/releases/old/diff_defined_functions__0.6__18.09.04_16:36:11.zip
new file mode 100644 (file)
index 0000000..99472a3
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.04_16:36:11.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.05_11:25:00.zip b/releases/old/diff_defined_functions__0.6__18.09.05_11:25:00.zip
new file mode 100644 (file)
index 0000000..b255822
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.05_11:25:00.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.11_17:24:39.zip b/releases/old/diff_defined_functions__0.6__18.09.11_17:24:39.zip
new file mode 100644 (file)
index 0000000..3509c98
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.11_17:24:39.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.12_16:55:06.zip b/releases/old/diff_defined_functions__0.6__18.09.12_16:55:06.zip
new file mode 100644 (file)
index 0000000..3f2414d
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.12_16:55:06.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.13_18:09:17.zip b/releases/old/diff_defined_functions__0.6__18.09.13_18:09:17.zip
new file mode 100644 (file)
index 0000000..3bfd8b3
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.13_18:09:17.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.14_14:49:25.zip b/releases/old/diff_defined_functions__0.6__18.09.14_14:49:25.zip
new file mode 100644 (file)
index 0000000..aee1251
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.14_14:49:25.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.19_10:00:20.zip b/releases/old/diff_defined_functions__0.6__18.09.19_10:00:20.zip
new file mode 100644 (file)
index 0000000..914736f
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.19_10:00:20.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.20_17:21:47.zip b/releases/old/diff_defined_functions__0.6__18.09.20_17:21:47.zip
new file mode 100644 (file)
index 0000000..221e173
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.20_17:21:47.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.25_17:45:42.zip b/releases/old/diff_defined_functions__0.6__18.09.25_17:45:42.zip
new file mode 100644 (file)
index 0000000..9a93121
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.25_17:45:42.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.25_17:46:26.zip b/releases/old/diff_defined_functions__0.6__18.09.25_17:46:26.zip
new file mode 100644 (file)
index 0000000..dedf9cc
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.25_17:46:26.zip differ
diff --git a/releases/old/diff_defined_functions__0.6__18.09.25_17:51:08.zip b/releases/old/diff_defined_functions__0.6__18.09.25_17:51:08.zip
new file mode 100644 (file)
index 0000000..dedf9cc
Binary files /dev/null and b/releases/old/diff_defined_functions__0.6__18.09.25_17:51:08.zip differ