GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
qrp.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2018 John W. Eaton
4 Copyright (C) 2009 VZLU Prague
5 
6 This file is part of Octave.
7 
8 Octave is free software: you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with Octave; see the file COPYING. If not, see
20 <https://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if ! defined (octave_qrp_h)
25 #define octave_qrp_h 1
26 
27 #include "octave-config.h"
28 
29 #include "PermMatrix.h"
30 #include "qr.h"
31 
32 namespace octave
33 {
34  namespace math
35  {
36  template <typename T>
37  class
38  qrp : public qr<T>
39  {
40  public:
41 
42  typedef typename T::real_row_vector_type RV_T;
43 
44  typedef typename qr<T>::type type;
45 
46  qrp (void) : qr<T> (), p () { }
47 
48  qrp (const T&, type = qr<T>::std);
49 
50  qrp (const qrp& a) : qr<T> (a), p (a.p) { }
51 
52  qrp& operator = (const qrp& a)
53  {
54  if (this != &a)
55  {
57  p = a.p;
58  }
59 
60  return *this;
61  }
62 
63  ~qrp (void) = default;
64 
65  void init (const T&, type = qr<T>::std);
66 
67  PermMatrix P (void) const { return p; }
68 
69  RV_T Pvec (void) const;
70 
71  private:
72 
74  };
75  }
76 }
77 
78 #endif
qrp(void)
Definition: qrp.h:46
PermMatrix P(void) const
Definition: qrp.h:67
qr & operator=(const qr &a)
Definition: qr.h:65
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:400
PermMatrix p
Definition: qrp.h:73
qr< T >::type type
Definition: qrp.h:44
idx type
Definition: ov.cc:3114
qrp(const qrp &a)
Definition: qrp.h:50
T::real_row_vector_type RV_T
Definition: qrp.h:42
p
Definition: lu.cc:138