comparison liboctave/dbleAEPBAL.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_AEPBALANCE_h 1 26 #define octave_AEPBALANCE_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 "dMatrix.h" 32 #include "dMatrix.h"
33 #include "dColVector.h"
31 34
32 class 35 class
33 OCTAVE_API 36 OCTAVE_API
34 AEPBALANCE 37 AEPBALANCE : public base_aepbal<Matrix, ColumnVector>
35 { 38 {
36 public: 39 public:
37 40
38 AEPBALANCE (void) : balanced_mat (), balancing_mat () { } 41 AEPBALANCE (void) : base_aepbal<Matrix, ColumnVector> () { }
39 42
40 AEPBALANCE (const Matrix& a,const std::string& balance_job) 43 AEPBALANCE (const Matrix& a, bool noperm = false,
41 { 44 bool noscal = false);
42 init (a, balance_job);
43 }
44 45
45 AEPBALANCE (const AEPBALANCE& a) 46 AEPBALANCE (const AEPBALANCE& a)
46 : balanced_mat (a.balanced_mat), balancing_mat (a.balancing_mat) { } 47 : base_aepbal<Matrix, ColumnVector> (a) { }
47 48
48 AEPBALANCE& operator = (const AEPBALANCE& a) 49 Matrix 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 ~AEPBALANCE (void) { }
59
60 Matrix balanced_matrix (void) const { return balanced_mat; }
61
62 Matrix balancing_matrix (void) const { return balancing_mat; }
63
64 friend std::ostream& operator << (std::ostream& os, const AEPBALANCE& a);
65
66 private:
67
68 Matrix balanced_mat;
69 Matrix balancing_mat;
70
71 octave_idx_type init (const Matrix& a, const std::string& balance_job);
72 }; 50 };
73 51
74 #endif 52 #endif
75 53
76 /* 54 /*