JuliaLang/julia — pull request #6265 by andreasnoackjensen (2014-03-25 13:17:16+00:00)
Title: RFC: Add julia ldlt factorization and solver for SymTridiagonal and julia lu factorization for Tridiagonal

@alanedelman suggested Julia implementation for factorizations of `SymTridiagonal`s. I have followed LAPACK and used ldlt for `SymTridiagonal` because it doesn't require allocation. I also wrote a solver for the factorization and removed the calls to LAPACK.

For `Tridiagonal`, I translated the lu from LAPACK to Julia since I didn't dare to open a pull request with a version without pivoting. To do so, I have changed the `Tridiagonal` type to only have one extra vector allocation. This is required for the pivoting. This also caused some cleanup of the tridiagonal code. I have changed all `solve` methods to `A_ldiv_B` to be consistent with the rest of `Base`. If anyone uses the `Tridiagonal` code please have a look and test.

A style innovation that I would like some comments on is that I have parametrized lu and ldlt on matrix type. In consequence there is only one lu type definition because it works for ordinary matrices as well as tridiagonals. This change also makes it possible to use array views in factorizations. I would like to extend this innovation to the other special matrices such that e.g. `Triangular` can be any `AbstractMatrix`.

Finally, I Implement `convert(AbstractArray,x)` and `convert(Factorization,x)` methods as proposed by @JeffBezanson in #6078. I get the same type of warnings `could not show value of type Tuple`. @JeffBezanson can you figure out what is wrong?

cc: @jiahao