-
Notifications
You must be signed in to change notification settings - Fork 75
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
Use Leja ordering for fromroots
#586
Changes from all commits
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 |
---|---|---|
|
@@ -984,6 +984,10 @@ end | |
b = fromroots(r) | ||
(b ≈ a) & isreal(coeffs(b)) # the coeff should be real | ||
end | ||
p = Polynomial([1; zeros(99); -1]) | ||
if P !== FactoredPolynomial | ||
@test fromroots(P, roots(p)) * p[end] ≈ p | ||
Comment on lines
+988
to
+989
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. For 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. Well that's a question for another day, but it seems like a reasonable thing to do. The extra package has negligible load time. |
||
end | ||
end | ||
end | ||
|
||
|
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.
Alternatively, Compat.jl provides that
argmax
method. Would depending on Compat be an option or should we keep this loop? (Same below.)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.
I don't mind having some small copy of package code in this package for easier compatability. I'd keep the loop unless you have a strong preference.