I am writing a preliminary class to represent Holonomic Function. Link 
<http://paste.ofcode.org/jNB29mns5iYuP3LfDaC8g5>

I need to know if I am going in the right direction or should I use some 
different approach. I have question regarding printing of Holonomic 
Functions, How can I add pretty printing and other methods for this class? 
 Or is the `def __repr__` method sufficient?

Also, In the class DifferentialOperator I have implemented the 
multiplication rule i.e Dx*a = a*Dx + Derivative(a). e.g. 

>>> Dx = symbols('Dx')
>>> p =DifferentialOperator(Dx-1)
>>> q =DifferentialOperator(x*Dx+1)
>>> p*q
  2                    
Dx ⋅x - Dx⋅x + 2⋅Dx - 1


which should return:

x*Dx^2 + (-x + 2)*Dx - 1

The problem is that `Dx` is getting printed before `x`, which is wrong in 
this case due to non-commutativity. What should I do in order to get `x` 
printed before `Dx`?

I also tried defining the holonomic function class by inheriting from 
Sympy's `Function` class, but I keep getting this error. Link 
<http://paste.ofcode.org/SyX4ZD3shEc2HuaQSiatF2>. Also if I use this 
approach then should I override different operations e.g. __add__  in our 
class or we have to do it in any other way?

 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/d2ff8012-2265-4786-8d5f-40d42188f968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to