GNU Octave 10.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-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_gepbalance_h)
27#define octave_gepbalance_h 1
28
29#include "octave-config.h"
30
31#include <string>
32
34
36
37template <typename T>
39{
40public:
41
42 typedef typename T::real_matrix_type RT;
43
45 : m_balanced_mat (), m_balanced_mat2 (), m_balancing_mat (),
46 m_balancing_mat2 ()
47 { }
48
49 gepbalance (const T& a, const T& b, const std::string& job)
50 : m_balanced_mat (), m_balanced_mat2 (), m_balancing_mat (),
51 m_balancing_mat2 ()
52 {
53 init (a, b, job);
54 }
55
57 : m_balanced_mat (a.m_balanced_mat),
58 m_balanced_mat2 (a.m_balanced_mat2),
59 m_balancing_mat (a.m_balancing_mat),
60 m_balancing_mat2 (a.m_balancing_mat2)
61 { }
62
64 {
65 if (this != &a)
66 {
67 m_balanced_mat = a.m_balanced_mat;
68 m_balanced_mat2 = a.m_balanced_mat2;
69 m_balancing_mat = a.m_balancing_mat;
70 m_balancing_mat2 = a.m_balancing_mat2;
71 }
72
73 return *this;
74 }
75
76 ~gepbalance () = default;
77
78 T balanced_matrix () const { return m_balanced_mat; }
79
80 T balanced_matrix2 () const { return m_balanced_mat2; }
81
82 RT balancing_matrix () const { return m_balancing_mat; }
83
84 RT balancing_matrix2 () const { return m_balancing_mat2; }
85
86private:
87
88 T m_balanced_mat;
89 T m_balanced_mat2;
90 RT m_balancing_mat;
91 RT m_balancing_mat2;
92
94 init (const T& a, const T& b, const std::string& job);
95};
96
97OCTAVE_END_NAMESPACE(math)
98OCTAVE_END_NAMESPACE(octave)
99
100#endif
gepbalance(const T &a, const T &b, const std::string &job)
Definition gepbalance.h:49
T balanced_matrix2() const
Definition gepbalance.h:80
T balanced_matrix() const
Definition gepbalance.h:78
RT balancing_matrix() const
Definition gepbalance.h:82
gepbalance & operator=(const gepbalance &a)
Definition gepbalance.h:63
T::real_matrix_type RT
Definition gepbalance.h:42
RT balancing_matrix2() const
Definition gepbalance.h:84
~gepbalance()=default
gepbalance(const gepbalance &a)
Definition gepbalance.h:56
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition main.in.cc:55