Skip to content
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

Provide inv and det of Tridiagonal and SymTridiagonal matrices #5358

Merged
merged 5 commits into from
Jan 12, 2014

Conversation

jiahao
Copy link
Member

@jiahao jiahao commented Jan 11, 2014

This PR provides fast methods for computing the inverse and determinant of Tridiagonal (and SymTridiagonal) matrices.

@@ -351,7 +420,7 @@ type LUTridiagonal{T} <: Factorization{T}
# end
end
lufact!{T<:BlasFloat}(A::Tridiagonal{T}) = LUTridiagonal{T}(LAPACK.gttrf!(A.dl,A.d,A.du)...)
lufact!(A::Tridiagonal) = lufact!(float(A))
lufact!{T<:Integer}(A::Tridiagonal{T}) = lufact!(float(A))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes rational matrices, but I think we'll have LU implementations in julia soon, so maybe it doesn't matter.

@andreasnoack
Copy link
Member

Besides the minor comment, I think this looks fine.

@jiahao
Copy link
Member Author

jiahao commented Jan 12, 2014

Yes, it would be irrational to leave out the Rationals before we had a type-stable computation for them.

jiahao added a commit that referenced this pull request Jan 12, 2014
Provide inv and det of Tridiagonal and SymTridiagonal matrices
@jiahao jiahao merged commit 43ec0e3 into master Jan 12, 2014
@jiahao jiahao deleted the cjh/tridiag-invdet branch January 12, 2014 17:13
@jiahao jiahao mentioned this pull request Feb 18, 2014
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants