GNU Octave  4.4.1
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-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_gepbalance_h)
24 #define octave_gepbalance_h 1
25 
26 #include "octave-config.h"
27 
28 #include <string>
29 
30 namespace octave
31 {
32  namespace math
33  {
34  template <typename T>
35  class
37  {
38  public:
39 
40  typedef typename T::real_matrix_type RT;
41 
42  gepbalance (void)
43  : balanced_mat (), balanced_mat2 (), balancing_mat (), balancing_mat2 ()
44  { }
45 
46  gepbalance (const T& a, const T& b, const std::string& job)
47  : balanced_mat (), balanced_mat2 (), balancing_mat (), balancing_mat2 ()
48  {
49  init (a, b, job);
50  }
51 
53  : balanced_mat (a.balanced_mat), balanced_mat2 (a.balanced_mat2),
54  balancing_mat (a.balancing_mat), balancing_mat2 (a.balancing_mat2)
55  { }
56 
57  gepbalance& operator = (const gepbalance& a)
58  {
59  if (this != &a)
60  {
61  balanced_mat = a.balanced_mat;
62  balanced_mat2 = a.balanced_mat2;
63  balancing_mat = a.balancing_mat;
64  balancing_mat2 = a.balancing_mat2;
65  }
66 
67  return *this;
68  }
69 
70  ~gepbalance (void) = default;
71 
72  T balanced_matrix (void) const { return balanced_mat; }
73 
74  T balanced_matrix2 (void) const { return balanced_mat2; }
75 
76  RT balancing_matrix (void) const { return balancing_mat; }
77 
78  RT balancing_matrix2 (void) const { return balancing_mat2; }
79 
80  private:
81 
86 
87  octave_idx_type init (const T& a, const T& b, const std::string& job);
88  };
89  }
90 }
91 
92 #endif
T::real_matrix_type RT
Definition: gepbalance.h:40
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:400
RT balancing_matrix(void) const
Definition: gepbalance.h:76
RT balancing_matrix2(void) const
Definition: gepbalance.h:78
gepbalance(const gepbalance &a)
Definition: gepbalance.h:52
gepbalance(const T &a, const T &b, const std::string &job)
Definition: gepbalance.h:46
b
Definition: cellfun.cc:400
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition: utils.cc:888
T balanced_matrix(void) const
Definition: gepbalance.h:72
T balanced_matrix2(void) const
Definition: gepbalance.h:74