Skip to content
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

Add bisection root-finder in arbitrary dimension #7

Merged
merged 16 commits into from
May 12, 2017
Merged

Conversation

dpsanders
Copy link
Member

@dpsanders dpsanders commented Apr 24, 2017

This adds a bisection root finder that works with single or multiple variables.

Currently, this involves modifying the Root type.
For bisection in particular, this is, in some sense, not necessary, since it cannot prove uniqueness, so any roots are :unknown.

However, for multi-dimensional root finding in general, it is maybe necessary to do so.

@dpsanders
Copy link
Member Author

dpsanders commented Apr 24, 2017

Moved from JuliaIntervals/ValidatedNumerics.jl#262.

@dpsanders dpsanders changed the title Add bisection routines in arbitrary dimension Add bisection root-finder in arbitrary dimension Apr 24, 2017
@dpsanders
Copy link
Member Author

Any comments, @lbenet?

@codecov-io
Copy link

codecov-io commented Apr 24, 2017

Codecov Report

Merging #7 into master will decrease coverage by 8.89%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master       #7     +/-   ##
=========================================
- Coverage   91.08%   82.18%   -8.9%     
=========================================
  Files           4        5      +1     
  Lines         157      174     +17     
=========================================
  Hits          143      143             
- Misses         14       31     +17
Impacted Files Coverage Δ
src/bisection.jl 0% <0%> (ø)
src/newton.jl 80.7% <100%> (-10.53%) ⬇️
src/IntervalRootFinding.jl 86.79% <100%> (+1.68%) ⬆️
src/krawczyk.jl 95.45% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6528e2f...8734c27. Read the comment docs.

@dpsanders
Copy link
Member Author

If you don't have any problem, I'm planning to merge this @lbenet.

@lbenet
Copy link
Member

lbenet commented May 8, 2017

I will review it now; if I don't come back to you before lunch time, simple go ahead.... Sorry.

Copy link
Member

@lbenet lbenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready to be merged; the change in Root is not so dramatic. I've included one optional comment only.

Again, sorry for the long delay...

"""
function g(X::IntervalBox)
x, y = X
z = x + im*y;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really transcendental, but I read elsewhere that this is better written as z = complex(x, y) (avoids one multiplication and one addition).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it maybe even better as z = complex( X... ) directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks.

@dpsanders
Copy link
Member Author

I would like to add complex_bisection as part of the source and export it.
(It's currently just in examples.)

It's not the best name, but I can't think of a better one right now, and it's pretty nice that it's so easy to write.

@lbenet
Copy link
Member

lbenet commented May 8, 2017

I would like to add complex_bisection as part of the source and export it.
(It's currently just in examples.)

I agree with you.

@lbenet
Copy link
Member

lbenet commented May 8, 2017

LGTM. I'll wait to travis before merging.

@dpsanders dpsanders merged commit 620eed3 into master May 12, 2017
@@ -0,0 +1,34 @@
using ValidatedNumerics, ValidatedNumerics.RootFinding
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not in test/REQUIRE

and this file isn't getting run?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks.

@dpsanders dpsanders deleted the bisection_new branch June 17, 2017 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants