GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
fEIG.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1994-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_fEIG_h)
27#define octave_fEIG_h 1
28
29#include "octave-config.h"
30
31#include <iosfwd>
32
33#include "mx-fwd.h"
34
35#include "fCColVector.h"
36#include "fCMatrix.h"
37
39{
40 friend class FloatMatrix;
41 friend class FloatComplexMatrix;
42
43public:
44
45 FloatEIG () : m_lambda (), m_v (), m_w () { }
46
47 FloatEIG (const FloatMatrix& a, bool calc_rev = true,
48 bool calc_lev = true, bool balance = true)
49 : m_lambda (), m_v (), m_w ()
50 {
51 init (a, calc_rev, calc_lev, balance);
52 }
53
55 bool calc_rev = true, bool calc_lev = true, bool balance = true)
56 : m_lambda (), m_v (), m_w ()
57 {
58 info = init (a, calc_rev, calc_lev, balance);
59 }
60
61 FloatEIG (const FloatMatrix& a, const FloatMatrix& b,
62 bool calc_rev = true, bool calc_lev = true, bool force_qz = false)
63 : m_lambda (), m_v (), m_w ()
64 {
65 init (a, b, calc_rev, calc_lev, force_qz);
66 }
67
68 FloatEIG (const FloatMatrix& a, const FloatMatrix& b, octave_idx_type& info,
69 bool calc_rev = true, bool calc_lev = true, bool force_qz = false)
70 : m_lambda (), m_v (), m_w ()
71 {
72 info = init (a, b, calc_rev, calc_lev, force_qz);
73 }
74
75 FloatEIG (const FloatComplexMatrix& a, bool calc_rev = true,
76 bool calc_lev = true, bool balance = true)
77 : m_lambda (), m_v (), m_w ()
78 {
79 init (a, calc_rev, calc_lev, balance);
80 }
81
83 bool calc_rev = true, bool calc_lev = true, bool balance = true)
84 : m_lambda (), m_v (), m_w ()
85 {
86 info = init (a, calc_rev, calc_lev, balance);
87 }
88
90 bool calc_rev = true, bool calc_lev = true, bool force_qz = false)
91 : m_lambda (), m_v (), m_w ()
92 {
93 init (a, b, calc_rev, calc_lev, force_qz);
94 }
95
97 octave_idx_type& info, bool calc_rev = true, bool calc_lev = true,
98 bool force_qz = false)
99 : m_lambda (), m_v (), m_w ()
100 {
101 info = init (a, b, calc_rev, calc_lev, force_qz);
102 }
103
104 FloatEIG (const FloatEIG& a) : m_lambda (a.m_lambda), m_v (a.m_v), m_w (a.m_w) { }
105
106 FloatEIG& operator = (const FloatEIG& a)
107 {
108 if (this != &a)
109 {
110 m_lambda = a.m_lambda;
111 m_v = a.m_v;
112 m_w = a.m_w;
113 }
114 return *this;
115 }
116
117 ~FloatEIG () = default;
118
119 FloatComplexColumnVector eigenvalues () const { return m_lambda; }
120 FloatComplexMatrix right_eigenvectors () const { return m_v; }
121 FloatComplexMatrix left_eigenvectors () const { return m_w; }
122
123 friend std::ostream& operator << (std::ostream& os, const FloatEIG& a);
124
125private:
126
130
131 octave_idx_type init (const FloatMatrix& a, bool calc_rev, bool calc_lev,
132 bool balance);
133
134 octave_idx_type init (const FloatMatrix& a, const FloatMatrix& b,
135 bool calc_rev, bool calc_lev, bool force_qz);
136
137 octave_idx_type init (const FloatComplexMatrix& a, bool calc_rev,
138 bool calc_lev, bool balance);
139
140 octave_idx_type init (const FloatComplexMatrix& a,
141 const FloatComplexMatrix& b,
142 bool calc_rev, bool calc_lev, bool force_qz);
143
144 octave_idx_type symmetric_init (const FloatMatrix& a, bool calc_rev,
145 bool calc_lev);
146
147 octave_idx_type symmetric_init (const FloatMatrix& a, const FloatMatrix& b,
148 bool calc_rev, bool calc_lev);
149
150 octave_idx_type hermitian_init (const FloatComplexMatrix& a,
151 bool calc_rev, bool calc_lev);
152
153 octave_idx_type hermitian_init (const FloatComplexMatrix& a,
154 const FloatComplexMatrix& b,
155 bool calc_rev, bool calc_lev);
156
157};
158
159#endif
template std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatEIG(const FloatEIG &a)
Definition fEIG.h:104
FloatEIG(const FloatMatrix &a, const FloatMatrix &b, bool calc_rev=true, bool calc_lev=true, bool force_qz=false)
Definition fEIG.h:61
FloatEIG(const FloatComplexMatrix &a, const FloatComplexMatrix &b, bool calc_rev=true, bool calc_lev=true, bool force_qz=false)
Definition fEIG.h:89
FloatComplexMatrix left_eigenvectors() const
Definition fEIG.h:121
FloatEIG(const FloatComplexMatrix &a, octave_idx_type &info, bool calc_rev=true, bool calc_lev=true, bool balance=true)
Definition fEIG.h:82
FloatEIG(const FloatMatrix &a, octave_idx_type &info, bool calc_rev=true, bool calc_lev=true, bool balance=true)
Definition fEIG.h:54
FloatEIG()
Definition fEIG.h:45
FloatComplexMatrix right_eigenvectors() const
Definition fEIG.h:120
FloatComplexColumnVector eigenvalues() const
Definition fEIG.h:119
FloatEIG(const FloatMatrix &a, const FloatMatrix &b, octave_idx_type &info, bool calc_rev=true, bool calc_lev=true, bool force_qz=false)
Definition fEIG.h:68
FloatEIG(const FloatComplexMatrix &a, bool calc_rev=true, bool calc_lev=true, bool balance=true)
Definition fEIG.h:75
FloatEIG(const FloatMatrix &a, bool calc_rev=true, bool calc_lev=true, bool balance=true)
Definition fEIG.h:47
~FloatEIG()=default
FloatEIG(const FloatComplexMatrix &a, const FloatComplexMatrix &b, octave_idx_type &info, bool calc_rev=true, bool calc_lev=true, bool force_qz=false)
Definition fEIG.h:96
#define OCTAVE_API
Definition main.in.cc:55