GNU Octave  4.0.0
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
fEIG.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2015 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_fEIG_h)
24 #define octave_fEIG_h 1
25 
26 #include <iosfwd>
27 
28 #include "fMatrix.h"
29 #include "fCMatrix.h"
30 #include "fCColVector.h"
31 
32 class
33 OCTAVE_API
35 {
36  friend class FloatMatrix;
37  friend class FloatComplexMatrix;
38 
39 public:
40 
41  FloatEIG (void)
42  : lambda (), v () { }
43 
44  FloatEIG (const FloatMatrix& a, bool calc_eigenvectors = true)
45  : lambda (), v ()
46  {
47  init (a, calc_eigenvectors);
48  }
49 
51  bool calc_eigenvectors = true)
52  : lambda (), v ()
53  {
54  info = init (a, calc_eigenvectors);
55  }
56 
57  FloatEIG (const FloatMatrix& a, const FloatMatrix& b,
58  bool calc_eigenvectors = true)
59  : lambda (), v ()
60  {
61  init (a, b, calc_eigenvectors);
62  }
63 
64  FloatEIG (const FloatMatrix& a, const FloatMatrix& b, octave_idx_type& info,
65  bool calc_eigenvectors = true)
66  : lambda (), v ()
67  {
68  info = init (a, b, calc_eigenvectors);
69  }
70 
71  FloatEIG (const FloatComplexMatrix& a, bool calc_eigenvectors = true)
72  : lambda (), v ()
73  {
74  init (a, calc_eigenvectors);
75  }
76 
78  bool calc_eigenvectors = true)
79  : lambda (), v ()
80  {
81  info = init (a, calc_eigenvectors);
82  }
83 
85  bool calc_eigenvectors = true)
86  : lambda (), v ()
87  {
88  init (a, b, calc_eigenvectors);
89  }
90 
92  octave_idx_type& info, bool calc_eigenvectors = true)
93  : lambda (), v ()
94  {
95  info = init (a, b, calc_eigenvectors);
96  }
97 
98  FloatEIG (const FloatEIG& a) : lambda (a.lambda), v (a.v) { }
99 
101  {
102  if (this != &a)
103  {
104  lambda = a.lambda;
105  v = a.v;
106  }
107  return *this;
108  }
109 
110  ~FloatEIG (void) { }
111 
112  FloatComplexColumnVector eigenvalues (void) const { return lambda; }
113 
114  FloatComplexMatrix eigenvectors (void) const { return v; }
115 
116  friend std::ostream& operator << (std::ostream& os, const FloatEIG& a);
117 
118 private:
119 
122 
123  octave_idx_type init (const FloatMatrix& a, bool calc_eigenvectors);
124  octave_idx_type init (const FloatMatrix& a, const FloatMatrix& b,
125  bool calc_eigenvectors);
126  octave_idx_type init (const FloatComplexMatrix& a, bool calc_eigenvectors);
127  octave_idx_type init (const FloatComplexMatrix& a,
128  const FloatComplexMatrix& b, bool calc_eigenvectors);
129 
130  octave_idx_type symmetric_init (const FloatMatrix& a, bool calc_eigenvectors);
131  octave_idx_type symmetric_init (const FloatMatrix& a, const FloatMatrix& b,
132  bool calc_eigenvectors);
133  octave_idx_type hermitian_init (const FloatComplexMatrix& a,
134  bool calc_eigenvectors);
135  octave_idx_type hermitian_init (const FloatComplexMatrix& a,
136  const FloatComplexMatrix& b,
137  bool calc_eigenvectors);
138 };
139 
140 #endif
FloatComplexMatrix v
Definition: fEIG.h:121
FloatEIG(void)
Definition: fEIG.h:41
FloatComplexMatrix eigenvectors(void) const
Definition: fEIG.h:114
FloatEIG(const FloatMatrix &a, bool calc_eigenvectors=true)
Definition: fEIG.h:44
FloatComplexNDArray & operator=(const FloatComplexNDArray &a)
Definition: fCNDArray.h:56
FloatComplexColumnVector eigenvalues(void) const
Definition: fEIG.h:112
FloatComplexColumnVector lambda
Definition: fEIG.h:120
Definition: fEIG.h:32
FloatEIG(const FloatMatrix &a, const FloatMatrix &b, bool calc_eigenvectors=true)
Definition: fEIG.h:57
FloatEIG(const FloatComplexMatrix &a, bool calc_eigenvectors=true)
Definition: fEIG.h:71
FloatEIG(const FloatMatrix &a, octave_idx_type &info, bool calc_eigenvectors=true)
Definition: fEIG.h:50
FloatEIG(const FloatComplexMatrix &a, octave_idx_type &info, bool calc_eigenvectors=true)
Definition: fEIG.h:77
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatEIG(const FloatEIG &a)
Definition: fEIG.h:98
FloatEIG(const FloatComplexMatrix &a, const FloatComplexMatrix &b, bool calc_eigenvectors=true)
Definition: fEIG.h:84
FloatEIG(const FloatComplexMatrix &a, const FloatComplexMatrix &b, octave_idx_type &info, bool calc_eigenvectors=true)
Definition: fEIG.h:91
FloatEIG(const FloatMatrix &a, const FloatMatrix &b, octave_idx_type &info, bool calc_eigenvectors=true)
Definition: fEIG.h:64
~FloatEIG(void)
Definition: fEIG.h:110