##### lalsd

###### Prototype

There is one prototype of `lalsd` available, please see below.

    lalsd( const char uplo, const int_t smlsiz,
            const int_t n, VectorD& d, VectorE& e, MatrixB& b,
            const Scalar >, int_t& rank );

###### Description

`lalsd` (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines SLALSD, DLALSD, CLALSD, and ZLALSD. `lalsd` uses the singular value decomposition of A to solve the least squares problem of finding X to minimize the Euclidean norm of each column of A*X-B, where A is N-by-N upper bidiagonal, and X and B are N-by-NRHS. The solution X overwrites B.

The singular values of A smaller than RCOND times the largest singular value are treated as zero in solving the least squares problem; in this case a minimum norm solution is returned. The actual singular values are returned in D in ascending order.

This code makes very mild assumptions about floating point arithmetic. It will work on machines with a guard digit in add/subtract, or on those binary machines without guard digits which subtract like the Cray XMP, Cray YMP, Cray C 90, or Cray 2. It could conceivably fail on hexadecimal or decimal machines without guard digits, but we know of none.

The selection of the LAPACK routine is done during compile-time, and is determined by the type of values contained in type `VectorD`. The type of values is obtained through the `value_type` meta-function `typename value_type<VectorD>::type`. The dispatching table below illustrates to which specific routine the code path will be generated.

Table 1.365. Dispatching of lalsd

Value type of VectorD | LAPACK routine
--- | ---
`float` | SLALSD
`double` | DLALSD
`complex<float>` | CLALSD
`complex<double>` | ZLALSD

###### Definition

Defined in header `boost/numeric/bindings/lapack/auxiliary/lalsd.hpp`.

###### Parameters or Requirements on Types

Parameters

MatrixA

  The definition of term 1

MatrixB

  The definition of term 2

MatrixC

  The definition of term 3.

  Definitions may contain paragraphs.

###### Complexity

###### Example

    #include <boost/numeric/bindings/lapack/auxiliary/lalsd.hpp>
    using namespace boost::numeric::bindings;

    lapack::lalsd( x, y, z );

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files slalsd.f, dlalsd.f, clalsd.f, and zlalsd.f at Netlib.