-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
RFC: Use sparse triangular solvers for sparse triangular solves. #13793
Conversation
0c6a267
to
6cce310
Compare
These require test coverage and I've also just realized that |
6cce310
to
65aef54
Compare
65aef54
to
ced41dc
Compare
end | ||
ncol = chksquare(A) | ||
nrowB, ncolB = size(B, 1), size(B, 2) | ||
ncol = LinAlg.chksquare(A) | ||
if nrowB != ncol | ||
throw(DimensionMismatch("A is $(ncol)X$(ncol) and B has length $(n)")) |
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.
"has $nrowB rows"
…792. Make fwd/bwdTriSolve! work for triagular views Add check for triangular matrices in sparse factorize
ced41dc
to
2f9358f
Compare
This required a little more work than expected because I hit the limit for union sizes and therefore the return type for @tkelman I've split the pr into two commits. The first one is a candidate for backporting because I think it was a bug that |
end | ||
|
||
function show(io::IO, F::UmfpackLU) | ||
println(io, "UMFPACK LU Factorization of a $size(F) sparse matrix") |
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.
need another paren around $(size(F))
… adjustment to other methods. Solve real lhs problems with complex rhs by reinterpreting the rhs. Let factorize(SparseMatrixCSC) check for tringular matrices
2f9358f
to
87e26c5
Compare
RFC: Use sparse triangular solvers for sparse triangular solves.
@@ -800,6 +826,15 @@ scale{T,Tv,Ti}(b::Vector{T}, A::SparseMatrixCSC{Tv,Ti}) = | |||
function factorize(A::SparseMatrixCSC) | |||
m, n = size(A) | |||
if m == n | |||
if istril(A) | |||
if istriu(A) | |||
return return Diagonal(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.
@ScottPJones pointed out this typo on the mailing list. Apparently this isn't an error?
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.
No. I also thought it would be an error, but then realized that the line actually has test coverage. However, a few other lines in factorize(SparseMatrixCSC)
don't so I've prepared a small commit with extra tests which also removes the extra return.
Fixes JuliaLang/LinearAlgebra.jl#276