-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
lu(A, Val{false}) should be lu(A, pivot=false) #476
Comments
It's for consistency with the other factorizations that support pivoting (Cholesky and QR) because they have special types and we therefore need compile time dispatch for type stability in those cases. I don't like |
Maybe define a singleton type? e.g. |
I have no idea if this is feasible, but would it be possible to combine keyword arguments and |
@oscardssmith, the whole difficulty here is that checking the values can only be done at runtime, not a compile time. This is too late for type-stability if the return type depends on whether
|
(Closely related to JuliaLang/julia#24011.) |
Since 1.0 will have JuliaLang/julia#24362 , we should consider getting rid of the value-type dispatching here and simplifying the API to |
We could still allow a |
I hate LU(A,Val{False}) :-( |
I use the unpivoted
lu
function a lot in teaching linear algebra, because its results are more easily compared to hand calculations (where you rarely permute rows), and it is continually annoying to me that you do this by passingVal{false}
as the second argument — I feel like I'm exposing an ugly internal. Can't we changed this to apivot=false
keyword?LU factorization is a fairly expensive operation, so I am mystified by why we would care about dispatch performance here. Surely the cost of a runtime branch is negligible?
cc @andreasnoack
The text was updated successfully, but these errors were encountered: