#7560: len(t_span) > 2 case creates len(t_span) - 1 solutions
-------------------------------------------------+--------------------------
Reporter: adavid | Owner: jkantor
Type: defect | Status: needs_work
Priority: minor | Milestone: sage-5.6
Component: numerical | Resolution:
Keywords: ode_solver, ode_solve, t_span | Work issues:
Report Upstream: N/A | Reviewers: Timo Kluck
Authors: Jan Medlock | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------+--------------------------
Comment (by medlock):
Replying to [comment:11 tkluck]:
> Actually, why restrict to `len(t_span) >= 2` at all? I think we should
just:
>
> * return only the initial condition as a list with one element if
`len(t_span) == 1`;
> * return an empty list `[]` if we get `t_span == []`.
>
> For example, this can be useful if someone wants to find solutions on
the intersection of two sets. Then s/he does not have to treat an empty
intersection as a special case.
Patch updated.
Thanks for your comments. I implemented `len(t_span) == 2` and
`num_points` not specified. I also implemented `len(t_span) == 1` because
it was very easy.
I did not implement `len(t_span) == 0` because it would have required a
separate `if-then` branch. My further reasoning was that the initial
condition `y_0` is required, so `t_span[0]` is also required, although I
do see your point about how one could end up with `t_span` being empty.
I have a big rewriting of this file in the works: I hope you'll be able to
have a look.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7560#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.