00001 // Copyright (C) 2009-2011 NICTA (www.nicta.com.au)00002 // Copyright (C) 2009-2011 Conrad Sanderson00003 // 00004 // This file is part of the Armadillo C++ library.00005 // It is provided without any warranty of fitness00006 // for any purpose. You can redistribute this file00007 // and/or modify it under the terms of the GNU00008 // Lesser General Public License (LGPL) as published00009 // by the Free Software Foundation, either version 300010 // of the License or (at your option) any later version.00011 // (see http://www.opensource.org/licenses for more info)00012
00013
00016
00017
00018
00020 template<typename T1>
00021 inline00022 bool00023 qr00024 (
00025 Mat<typename T1::elem_type>& Q,
00026 Mat<typename T1::elem_type>& R,
00027 constBase<typename T1::elem_type,T1>& X,
00028 consttypenamearma_blas_type_only<typename T1::elem_type>::result* junk = 0
00029 )
00030 {
00031 arma_extra_debug_sigprint();
00032 arma_ignore(junk);
00033
00034 arma_debug_check( (&Q == &R), "qr(): Q and R are the same object");
00035
00036 constbool status = auxlib::qr(Q, R, X);
00037
00038 if(status == false)
00039 {
00040 Q.reset();
00041 R.reset();
00042 arma_bad("qr(): failed to converge", false);
00043 }
00044
00045 returnfalse;
00046 }
00047
00048
00049