Comment #22 on issue 3560 by [email protected]: solve() is a giant mess
http://code.google.com/p/sympy/issues/detail?id=3560
So here are my ideas
SolutionSet should just be a subclass of Set. I think we need to use a
custom subclass instead of just a Set because data like whether or not it
has found all solutions (issue 3699) is part of the whole solution set, not
individual solutions. There are also other potential attributes we might
add in the future (for example, expanding or restricting the solution set
based on assumptions).
Set objects already can handle all the things we want. A finite set of
solutions is FiniteSet. No solutions is EmptySet. Infinite solutions is
TransformationSet. Solutions to inequalities, might be some kind of
product set (if the set objects we need don't exist, we can just create
them).
The Solution object represents a single solution. It won't exist for
solutions to inequalities, only for discrete SolutionSet objects. It
should unify the two different kinds of solutions returned now, a
dictionary, like {x: 1, y: 2}, and a tuple (1, 2). In other words, if s is
the Solution from solve([x - 1, y - 2], [x, y]), then s[0] and s[x] should
give 1, and s[1] and s[y] should give 2. If [x, y] was not given and they
were determined automatically, then numerical indexing would not be allowed.
I'm still unclear what to do with parameterized solutions.
Another issue there that might come up is that sometimes the parameter can
be one of the original solve variables (like with an underdetermined linear
system), and sometimes it must be a new one.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" 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 http://groups.google.com/group/sympy-issues?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.