-
Notifications
You must be signed in to change notification settings - Fork 25
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
Reenable and fix example 5.5 from Smiley et al. #153
Changes from 6 commits
d4008c4
a2ce4a6
f24d844
fdb0771
3b4733c
779ba37
7bc322e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ end | |
|
||
# Bisection | ||
rts = roots(f, X, Bisection, 1e-3) | ||
@test length(rts) == 4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do get 4 boxes here (even though there are only 2 roots). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it gives an incorrect answer. Marking it as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see what you mean, but I don't agree that the result is unreliable. It is reliably giving you a set of boxes that are guaranteed to contain all of the roots in the original box, and correctly telling you that it is unable to guarantee whether or not there are actually roots there. The test is testing what the function returns, not what we would like it to ideally return ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, that makes sense. But testing for the result 4 seems overly specific if any number above 2 would acceptable. Maybe it would be better to test that the exact solutions are contained in whatever boxes are returned? I've created a separate PR #156 for that. |
||
@test_broken length(rts) == 2 | ||
|
||
for method in newtonlike_methods | ||
deriv = xx -> ForwardDiff.jacobian(f, xx) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this different / better than
_A = A; A = copy(_A)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I recall correctly, calling
similar()
on aStaticArray
gives aMutableArray
which is required for thesetindex!()
calls below.