JuliaLang/julia — pull request #4999 by timholy (2013-12-01 12:02:59+00:00)
Title: Rationalize return types of tridiag and Woodbury solve!()

This is a very minor change in a non-exported interface. But given that I've been mostly out of the loop with regards to the big improvements in the linear algebra routines, I thought it would be best to ask first.

The Tridiagonal and Woodbury `solve!` routines have an interface like this:
```
solve!(output, outputrng::Ranges{Int}, matrix, rhs, rhsrng::Ranges{Int})
```
As a reminder, the intent is that the combination of `output` and `outputrng` can be used to choose an arbitrary 1-d subvector (a row or column of a matrix, for example), without the overhead of allocating an actual `SubArray`. This is important because tridiagonal routines are often used in situations in which `mapslices` would be the natural interface, but for which it is not yet sufficiently performant. (There's a second important difference: `solve!` can work in-place because it is non-aliasing for tridiagonal matrices, so even if `mapslices` were faster one might not want to use it.) Examples of such usage can be found in `Grid.jl`.

For the general case, this changes the return of `solve!` to be `nothing`, because if we think of this as effectively generating `output[outputrng]`, then it doesn't really make sense to return `output`. For the variant that omits the `Range` inputs (defaulting to the entire range), `output` gets returned.