GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
gepbalance.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1994-2021 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 
33 namespace octave
34 {
35  namespace math
36  {
37  template <typename T>
38  class
40  {
41  public:
42 
43  typedef typename T::real_matrix_type RT;
44 
45  gepbalance (void)
46  : balanced_mat (), balanced_mat2 (), balancing_mat (), balancing_mat2 ()
47  { }
48 
49  gepbalance (const T& a, const T& b, const std::string& job)
50  : balanced_mat (), balanced_mat2 (), balancing_mat (), balancing_mat2 ()
51  {
52  init (a, b, job);
53  }
54 
56  : balanced_mat (a.balanced_mat), balanced_mat2 (a.balanced_mat2),
57  balancing_mat (a.balancing_mat), balancing_mat2 (a.balancing_mat2)
58  { }
59 
60  gepbalance& operator = (const gepbalance& a)
61  {
62  if (this != &a)
63  {
64  balanced_mat = a.balanced_mat;
65  balanced_mat2 = a.balanced_mat2;
66  balancing_mat = a.balancing_mat;
67  balancing_mat2 = a.balancing_mat2;
68  }
69 
70  return *this;
71  }
72 
73  ~gepbalance (void) = default;
74 
75  T balanced_matrix (void) const { return balanced_mat; }
76 
77  T balanced_matrix2 (void) const { return balanced_mat2; }
78 
79  RT balancing_matrix (void) const { return balancing_mat; }
80 
81  RT balancing_matrix2 (void) const { return balancing_mat2; }
82 
83  private:
84 
89 
90  octave_idx_type init (const T& a, const T& b, const std::string& job);
91  };
92  }
93 }
94 
95 #endif
gepbalance(const T &a, const T &b, const std::string &job)
Definition: gepbalance.h:49
T balanced_matrix2(void) const
Definition: gepbalance.h:77
RT balancing_matrix2(void) const
Definition: gepbalance.h:81
~gepbalance(void)=default
T::real_matrix_type RT
Definition: gepbalance.h:43
gepbalance(const gepbalance &a)
Definition: gepbalance.h:55
RT balancing_matrix(void) const
Definition: gepbalance.h:79
T balanced_matrix(void) const
Definition: gepbalance.h:75
octave_idx_type init(const T &a, const T &b, const std::string &job)