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

More specialized routines for Triangular matrices #5255

Merged
merged 16 commits into from
Jan 1, 2014
Merged

Conversation

jiahao
Copy link
Member

@jiahao jiahao commented Dec 29, 2013

This branch provides additional specialized routines for Triangular matrices

  • Generic linear solver using naive backward/forward substitution (implemented in naivesub!)
  • Generic matrix inversion using linear solver on identity matrix
  • Generic eigensystems in eigvals, eigvecs, eigfact
  • cond{T<:BlasFloat}, condition number estimate, wrapping
  • LAPACK.trcon!, reciprocal of condition number estimate for triangular matrices
  • specialized transpose, ctranspose, istril, istriu
  • tests for linear solver, eigensolver and cond()

Additionally:

  • Additional zeros, ones, infs and nans methods taking an AbstractMatrix argument
  • Type-stability bugfixes for generic cond method on dense matrices

@jiahao
Copy link
Member Author

jiahao commented Dec 29, 2013

Ready to merge pending review

end

#Generic solver using naive substitution
function naivesub!(A::Triangular, b::AbstractVector, x::AbstractVector=b)
Copy link
Member

Choose a reason for hiding this comment

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

Why not A_ldiv_B!? I would also prefer overwriting the right hand side. It is more in line with BLAS.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like having the name of the algorithm in the function (which isn't exported anyway). But I can definitely add A_ldiv_B! as a synonym.

I believe this function already overwrites the r.h.s. by default, since x is passed by reference and defaults to b.

Copy link
Member

Choose a reason for hiding this comment

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

I like having the name of the algorithm in the function

Ok, but I'd like a A_ldiv_B! synonym (and the spelling naïvesub!;-)).

I believe this function already overwrites the r.h.s.

My mistake. I missed the =b part.

Copy link
Member Author

Choose a reason for hiding this comment

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

he spelling naïvesub!;-)

I once had a long argument with an American about the correct spelling of "naïve". He refused to budge, so I called him a naïf. Apparently calling people "naïf" in the US is very amusing to them.

My mistake. I missed the =b part.

=b

- Generic inverse replaced with generic solve on identity matrix
- Specialized transpose, ctranspose, istril, istriu
- wraps LAPACK wrapper trcon!, reciprocal of condition number estimate for triangular matrices
- type stability bugfixes to generic cond()
- Triangular-specific tests for linear solver and cond()
- Wraps LAPACK.trevc!
- New eigvecs{T<:BlasFloat}(A::Triangular{T}) method
Addresses #3688

- Provides diag, generic multiplication and other simple routines
- Eigensystem solvers: eigvals, eigvecs, eigfact
- Provides simple wrappers for singular system solvers
- Adds convert routine from Triangular to dense Matrix
- Clean up bidiagonal Matrix tests
- Tests BigFloat and Complex{BigFloat}
- Tests naive substitution solver for all float types
- Wraps LAPCK.trrfs! which computes forward and backward errors
jiahao added a commit that referenced this pull request Jan 1, 2014
More specialized routines for Triangular matrices
@jiahao jiahao merged commit 48e599e into master Jan 1, 2014
@jiahao jiahao deleted the cjh/solve-triu branch January 1, 2014 17:24
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.

None yet

2 participants