-
Notifications
You must be signed in to change notification settings - Fork 0
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
Special support for roots when the coefficients are real? #19
Comments
It is guaranteed, the algorithm reduces the matrix until there is a linear or quadratic to evaluate. I'm not sure what is more convenient here though. Without thinking too much, this seems a bit complicated, but you could play around with it. The key lines in the https://github.com/jverzani/AMRVW.jl/blob/master/src/AMRVW_algorithm.jl file are 50, 79, 102, and 112. Unless I missed something, here is where |
The linked PR implements the feature, and it's actually trivial. I suppose your comment discusses a hypothetical lower-level implementation that would be more efficient? Still, I suppose my proof-of-concept PR is good for a start. |
Empirically, it seems that
roots(::Vector{Float64})
returns the roots such that they exactly conform to the form that follows from the complex conjugate root theorem. That is, a real root has its imaginary part as exactly zero, and complex roots come in complex conjugate pairs, where the complex conjugate operation is exact. Example:I wonder if (or to what degree) is this guaranteed or (alternatively) an accident?
If it is guaranteed, I think it would make sense if this package exposed a new interface that would return the roots in a less redundant and more convenient form, as expected from the complex conjugate root theorem. So, instead of returning a
Vector{Complex{<:AbstractFloat}}
, this new interface would return an instance of a type like this, where the complex conjugate root pairs are stored as only the root whose imaginary part is positive:How much sense am I making?
The text was updated successfully, but these errors were encountered: