00001 /*---------------------------------------------------------------------------* 00002 * IT++ * 00003 *---------------------------------------------------------------------------* 00004 * Copyright (c) 1995-2002 by Tony Ottosson, Thomas Eriksson, Pål Frenger, * 00005 * Tobias Ringström, and Jonas Samuelsson. * 00006 * * 00007 * Permission to use, copy, modify, and distribute this software and its * 00008 * documentation under the terms of the GNU General Public License is hereby * 00009 * granted. No representations are made about the suitability of this * 00010 * software for any purpose. It is provided "as is" without expressed or * 00011 * implied warranty. See the GNU General Public License for more details. * 00012 *---------------------------------------------------------------------------*/ 00016 // SPUC - Signal processing using C++ - A DSP library 00017 00028 #ifndef __lu_h 00029 #define __lu_h 00030 00031 #include <vector.h> 00032 #include <matrix.h> 00033 namespace SPUC { 00034 00037 00038 00063 bool lu(const mat &X, mat &L, mat &U, ivec &p); 00064 00065 #ifdef HAVE_LAPACK 00066 00092 bool lu(const cmat &X, cmat &L, cmat &U, ivec &p); 00093 00094 #endif 00095 00096 00098 void interchange_permutations(vec &b, const ivec &p); 00099 00101 bmat permutation_matrix(const ivec &p); 00103 } 00104 #endif // __lu_h