GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
lu.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1996-2017 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 the
10 Free Software Foundation; either version 3 of the License, or (at your
11 option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 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 <http://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if ! defined (octave_lu_h)
25 #define octave_lu_h 1
26 
27 #include "octave-config.h"
28 
29 #include "PermMatrix.h"
30 
31 namespace octave
32 {
33  namespace math
34  {
35  template <typename T>
36  class
37  lu
38  {
39  public:
40 
41  typedef typename T::column_vector_type VT;
42  typedef typename T::element_type ELT_T;
43 
44  lu (void)
45  : a_fact (), l_fact (), ipvt () { }
46 
47  lu (const T& a);
48 
49  lu (const lu& a)
50  : a_fact (a.a_fact), l_fact (a.l_fact), ipvt (a.ipvt) { }
51 
52  lu (const T& l, const T& u, const PermMatrix& p);
53 
54  lu& operator = (const lu& a)
55  {
56  if (this != &a)
57  {
58  a_fact = a.a_fact;
59  l_fact = a.l_fact;
60  ipvt = a.ipvt;
61  }
62 
63  return *this;
64  }
65 
66  virtual ~lu (void) { }
67 
68  bool packed (void) const;
69 
70  void unpack (void);
71 
72  T L (void) const;
73 
74  T U (void) const;
75 
76  T Y (void) const;
77 
78  PermMatrix P (void) const;
79 
80  ColumnVector P_vec (void) const;
81 
82  bool regular (void) const;
83 
84  void update (const VT& u, const VT& v);
85 
86  void update (const T& u, const T& v);
87 
88  void update_piv (const VT& u, const VT& v);
89 
90  void update_piv (const T& u, const T& v);
91 
92  protected:
93 
94  Array<octave_idx_type> getp (void) const;
95 
96  T a_fact;
97  T l_fact;
98 
100  };
101  }
102 }
103 
104 #endif
Octave interface to the compression and uncompression libraries.
Definition: aepbalance.cc:47
ar P
Definition: __luinc__.cc:49
virtual ~lu(void)
Definition: lu.h:66
T::column_vector_type VT
Definition: lu.h:41
u
Definition: lu.cc:138
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup calculate Y_a and Y _d item Given Y
Definition: DASPK-opts.cc:739
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:398
lu(void)
Definition: lu.h:44
T::element_type ELT_T
Definition: lu.h:42
p
Definition: lu.cc:138
lu(const lu &a)
Definition: lu.h:49
Array< octave_idx_type > ipvt
Definition: lu.h:99