The LUDC procedure replaces an n by n array, A, with the LU decomposition of a row-wise permutation of itself.

Note: If you are working with complex inputs, use the LA_LUDC procedure instead.

Examples


See the description of LUSOL for an example using this procedure.

Syntax


LUDC, A, Index [, /COLUMN] [, /DOUBLE] [, INTERCHANGES=variable]

Arguments


A

An n by n array of any type except string. Upon output, A is replaced with its LU decomposition.

Index

An output vector that records the row permutations which occurred as a result of partial pivoting.

Keywords


COLUMN

Set this keyword if the input array A is in column-major format (composed of column vectors) rather than in row-major format (composed of row vectors).

DOUBLE

Set this keyword to force the computation to be done in double-precision arithmetic.

INTERCHANGES

An output variable that is set to positive 1 if the number of row interchanges was even, or to negative 1 if the number of interchanges was odd.

Version History


4.0

Introduced

Resources and References


LUDC is based on the routine ludcmp described in section 2.3 of Numerical Recipes in C: The Art of Scientific Computing (Second Edition), published by Cambridge University Press, and is used by permission.

See Also


LA_LUDC, LUSOL