-
-
Notifications
You must be signed in to change notification settings - Fork 601
Improve documentation of how to access parts of the expression tree of a symbolic expression #9329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
comment:1
Did you have something specific in mind? You can always get at the underlying tree with operand() and operands()
This is what is done in expression_conversions.py |
comment:2
I think the original request from a user was in order to access the whole tree at once as a "parsed tree", since here of course |
comment:3
See http://sagenb.org/home/pub/1760/ for a simple implementation.
|
comment:4
Here is the thread: http://groups.google.com/group/sage-support/t/e4b769a26269b6ed I think this is more of a documentation problem. We don't have any explanation of how to work with symbolic expressions, either traversing the tree using I don't think adding a function like Jason suggests in comment:3 would provide anything more than that is already there. Note that in the example worksheet Jason also doesn't use this function. I suggest to close this ticket unless there is a more concrete suggestion. |
comment:5
Well, this seems very reasonable; I certainly wouldn't have ever figured out the way you do it in that thread. This probably belongs either at the top of one of expression.pyx or in the documentation for SymbolicExpression, huh? It would be nice to do an example with simplification as well as substitution. Changing ticket summary |
This comment has been minimized.
This comment has been minimized.
comment:7
Resurrecting the original idea because I want this for my discrete math class in a couple days and realize that even having a very basic example of how to use
I'm realizing it might even be useful to have a (binary) tree returned from a list of lists... but that wouldn't be here. |
comment:8
By the way, http://interact.sagemath.org/node/76 might be a nice example too (that's an extremely simple expression->Java translator...) |
comment:9
Does
count? |
comment:10
That certainly counts as one example. I don't know that people will know what to do with Basically, an introduction to how to write something like this for people who don't know jack about expression trees (like me, though teaching it certainly helped) is what would be helpful here. |
comment:15
See also #9424. |
Changed keywords from none to expression tree, symbolic expression |
comment:18
Note: the worksheet mentioned by jason in comment:3, originally at is now available, translated into a .sagews worksheet, at: |
The desire is to have clear documentation on how to apply (e.g.) factor() to just some piece of this, such as the exponent.
CC: @sagetrac-rossk @mforets @slel
Component: symbolics
Keywords: expression tree, symbolic expression
Issue created by migration from https://trac.sagemath.org/ticket/9329
The text was updated successfully, but these errors were encountered: