00001 /* 00002 00003 Copyright (C) 1994-2012 John W. Eaton 00004 00005 This file is part of Octave. 00006 00007 Octave is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by the 00009 Free Software Foundation; either version 3 of the License, or (at your 00010 option) any later version. 00011 00012 Octave is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Octave; see the file COPYING. If not, see 00019 <http://www.gnu.org/licenses/>. 00020 00021 */ 00022 00023 #if !defined (octave_QRP_h) 00024 #define octave_QRP_h 1 00025 00026 #include <iosfwd> 00027 00028 #include "dbleQR.h" 00029 #include "PermMatrix.h" 00030 #include "dColVector.h" 00031 00032 class 00033 OCTAVE_API 00034 QRP : public QR 00035 { 00036 public: 00037 00038 QRP (void) : QR (), p () { } 00039 00040 QRP (const Matrix&, qr_type_t = qr_type_std); 00041 00042 QRP (const QRP& a) : QR (a), p (a.p) { } 00043 00044 QRP& operator = (const QRP& a) 00045 { 00046 if (this != &a) 00047 { 00048 QR::operator = (a); 00049 p = a.p; 00050 } 00051 00052 return *this; 00053 } 00054 00055 ~QRP (void) { } 00056 00057 void init (const Matrix&, qr_type_t = qr_type_std); 00058 00059 PermMatrix P (void) const { return p; } 00060 00061 RowVector Pvec (void) const; 00062 00063 friend std::ostream& operator << (std::ostream&, const QRP&); 00064 00065 protected: 00066 00067 PermMatrix p; 00068 }; 00069 00070 #endif