GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
gepbalance.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1994-2026 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_gepbalance_h)
27#define octave_gepbalance_h 1
28
29#include "octave-config.h"
30
31#include <string>
32
35
36template <typename T>
38{
39public:
40
41 typedef typename T::real_matrix_type RT;
42
44 : m_balanced_mat (), m_balanced_mat2 (), m_balancing_mat (),
45 m_balancing_mat2 ()
46 { }
47
48 gepbalance (const T& a, const T& b, const std::string& job)
49 : m_balanced_mat (), m_balanced_mat2 (), m_balancing_mat (),
50 m_balancing_mat2 ()
51 {
52 init (a, b, job);
53 }
54
56 : m_balanced_mat (a.m_balanced_mat),
57 m_balanced_mat2 (a.m_balanced_mat2),
58 m_balancing_mat (a.m_balancing_mat),
59 m_balancing_mat2 (a.m_balancing_mat2)
60 { }
61
63 {
64 if (this != &a)
65 {
66 m_balanced_mat = a.m_balanced_mat;
67 m_balanced_mat2 = a.m_balanced_mat2;
68 m_balancing_mat = a.m_balancing_mat;
69 m_balancing_mat2 = a.m_balancing_mat2;
70 }
71
72 return *this;
73 }
74
75 ~gepbalance () = default;
76
77 T balanced_matrix () const { return m_balanced_mat; }
78
79 T balanced_matrix2 () const { return m_balanced_mat2; }
80
81 RT balancing_matrix () const { return m_balancing_mat; }
82
83 RT balancing_matrix2 () const { return m_balancing_mat2; }
84
85private:
86
87 T m_balanced_mat;
88 T m_balanced_mat2;
89 RT m_balancing_mat;
90 RT m_balancing_mat2;
91
93 init (const T& a, const T& b, const std::string& job);
94};
95
96OCTAVE_END_NAMESPACE(math)
97OCTAVE_END_NAMESPACE(octave)
98
99#endif
gepbalance(const T &a, const T &b, const std::string &job)
Definition gepbalance.h:48
T balanced_matrix2() const
Definition gepbalance.h:79
T balanced_matrix() const
Definition gepbalance.h:77
RT balancing_matrix() const
Definition gepbalance.h:81
gepbalance & operator=(const gepbalance &a)
Definition gepbalance.h:62
T::real_matrix_type RT
Definition gepbalance.h:41
RT balancing_matrix2() const
Definition gepbalance.h:83
~gepbalance()=default
gepbalance(const gepbalance &a)
Definition gepbalance.h:55
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition main.in.cc:55