Mercurial > hg > octave-nkf
comparison liboctave/CmplxAEPBAL.h @ 8386:a5e080076778
make balance more Matlab-compatible
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 09 Dec 2008 10:08:19 +0100 |
parents | a1dbe9d80eee |
children | d865363208d6 |
comparison
equal
deleted
inserted
replaced
8385:6e9660cd3bf2 | 8386:a5e080076778 |
---|---|
1 /* | 1 /* |
2 | 2 |
3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2004, 2005, 2006, |
4 2007 John W. Eaton | 4 2007 John W. Eaton |
5 Copyright (C) 2008 Jaroslav Hajek | |
5 | 6 |
6 This file is part of Octave. | 7 This file is part of Octave. |
7 | 8 |
8 Octave is free software; you can redistribute it and/or modify it | 9 Octave is free software; you can redistribute it and/or modify it |
9 under the terms of the GNU General Public License as published by the | 10 under the terms of the GNU General Public License as published by the |
25 #define octave_ComplexAEPBALANCE_h 1 | 26 #define octave_ComplexAEPBALANCE_h 1 |
26 | 27 |
27 #include <iostream> | 28 #include <iostream> |
28 #include <string> | 29 #include <string> |
29 | 30 |
31 #include "base-aepbal.h" | |
30 #include "CMatrix.h" | 32 #include "CMatrix.h" |
33 #include "dColVector.h" | |
31 | 34 |
32 class | 35 class |
33 OCTAVE_API | 36 OCTAVE_API |
34 ComplexAEPBALANCE | 37 ComplexAEPBALANCE : public base_aepbal<ComplexMatrix, ColumnVector> |
35 { | 38 { |
36 public: | 39 public: |
37 | 40 |
38 ComplexAEPBALANCE (void) : balanced_mat (), balancing_mat () { } | 41 ComplexAEPBALANCE (void) : base_aepbal<ComplexMatrix, ColumnVector> () { } |
39 | 42 |
40 ComplexAEPBALANCE (const ComplexMatrix& a, const std::string& balance_job) | 43 ComplexAEPBALANCE (const ComplexMatrix& a, bool noperm = false, |
41 { | 44 bool noscal = false); |
42 init (a, balance_job); | |
43 } | |
44 | 45 |
45 ComplexAEPBALANCE (const ComplexAEPBALANCE& a) | 46 ComplexAEPBALANCE (const ComplexAEPBALANCE& a) |
46 : balanced_mat (a.balanced_mat), balancing_mat (a.balancing_mat) { } | 47 : base_aepbal<ComplexMatrix, ColumnVector> (a) { } |
47 | 48 |
48 ComplexAEPBALANCE& operator = (const ComplexAEPBALANCE& a) | 49 ComplexMatrix balancing_matrix (void) const; |
49 { | |
50 if (this != &a) | |
51 { | |
52 balanced_mat = a.balanced_mat; | |
53 balancing_mat = a.balancing_mat; | |
54 } | |
55 return *this; | |
56 } | |
57 | |
58 ~ComplexAEPBALANCE (void) { } | |
59 | |
60 ComplexMatrix balanced_matrix (void) const { return balanced_mat; } | |
61 | |
62 ComplexMatrix balancing_matrix (void) const { return balancing_mat; } | |
63 | |
64 friend std::ostream& operator << (std::ostream& os, const ComplexAEPBALANCE& a); | |
65 | |
66 private: | |
67 | |
68 ComplexMatrix balanced_mat; | |
69 ComplexMatrix balancing_mat; | |
70 | |
71 octave_idx_type init (const ComplexMatrix& a, const std::string& balance_job); | |
72 }; | 50 }; |
73 | 51 |
74 #endif | 52 #endif |
75 | 53 |
76 /* | 54 /* |