lu_factor [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:algorithms Component type:function
Prototype
template <class DenseMatrix, class Pvector>
int lu_factor(DenseMatrix& A, Pvector& ipvt) ;
Description
This is the outer product (a level-2 operation) form of the LU Factorization with pivoting algorithm . This is equivalent to LAPACK's dgetf2. Also see "Matrix Computations" 3rd Ed. by Golub and Van Loan section 3.2.5 and especially page 115.

The pivot indices in ipvt are indexed starting from 1 so that this is compatible with LAPACK (Fortran).

Definition
lu.h
Preconditions
Complexity
Example
In lu_factorization.cc:
  typedef matrix<double, 
                 rectangle<>, 
                 dense<external>, 
                 column_major>::type Matrix;

  const Matrix::size_type N = 3;
  double da [] = { 1, 2, 2, 2, 1, 2, 2, 2, 1 };

  Matrix A(da, N, N);
  dense1D<int> pivots(N, 0);
  lu_factor(A, pivots);

Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.