Open dpsanders opened 9 years ago
What about simply including some conversion functions? That is, find_roots
returns an array of Roots, and through some functions (e.g., interval_to_midpoint
) does the rest of the work. The name is a simple suggestion, not more than that...
My previous comment is related to the ideas behind #35
Currently,
find_roots
is just a thin interface wrappingnewton
, and returns a slightly complicated structure, namely an array ofRoot
objects, which are tuples of theInterval
containing the root and a symbol saying if the root is:unique
or:unknown
.I would like
find_roots
(or a similar simple name) to be an interface for someone who wants to useValidatedNumerics
as a black box, so that they should not need to know anything about intervals.Currently, in the
midpoint_radius
branch, there isfind_roots_midpoint
that returns three arrays: the midpoints, the radii, and the symbols. This can be used with no knowledge ofInterval
.My proposal is to rename
find_roots_radius
tofind_roots
and assume that a user familiar with interval arithmetic will be happy using the interface directly vianewton
orkrawczyk
and dealing with the resulting intervals.cc @lbenet