Mercurial > hg > octave-nkf
annotate liboctave/CColVector.h @ 10312:cbc402e64d83
untabify liboctave header files
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 11 Feb 2010 12:14:48 -0500 |
parents | 4c0cdbe0acca |
children | 12884915a8e4 |
rev | line source |
---|---|
458 | 1 /* |
2 | |
7017 | 3 Copyright (C) 1994, 1995, 1996, 1997, 2000, 2002, 2003, 2004, 2005, |
8920 | 4 2006, 2007, 2008 John W. Eaton |
458 | 5 |
6 This file is part of Octave. | |
7 | |
8 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 | |
7016 | 10 Free Software Foundation; either version 3 of the License, or (at your |
11 option) any later version. | |
458 | 12 |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
458 | 21 |
22 */ | |
23 | |
24 #if !defined (octave_ComplexColumnVector_h) | |
25 #define octave_ComplexColumnVector_h 1 | |
26 | |
1214 | 27 #include "MArray.h" |
458 | 28 |
29 #include "mx-defs.h" | |
30 | |
3585 | 31 class |
6108 | 32 OCTAVE_API |
3585 | 33 ComplexColumnVector : public MArray<Complex> |
458 | 34 { |
1205 | 35 friend class ComplexMatrix; |
458 | 36 friend class ComplexRowVector; |
37 | |
38 public: | |
39 | |
1214 | 40 ComplexColumnVector (void) : MArray<Complex> () { } |
3585 | 41 |
5275 | 42 explicit ComplexColumnVector (octave_idx_type n) : MArray<Complex> (n) { } |
3585 | 43 |
9612
66970dd627f6
further liboctave design improvements
Jaroslav Hajek <highegg@gmail.com>
parents:
9237
diff
changeset
|
44 explicit ComplexColumnVector (const dim_vector& dv) : MArray<Complex> (dv) { } |
66970dd627f6
further liboctave design improvements
Jaroslav Hajek <highegg@gmail.com>
parents:
9237
diff
changeset
|
45 |
5275 | 46 ComplexColumnVector (octave_idx_type n, const Complex& val) |
3585 | 47 : MArray<Complex> (n, val) { } |
48 | |
49 ComplexColumnVector (const ComplexColumnVector& a) : MArray<Complex> (a) { } | |
50 | |
1214 | 51 ComplexColumnVector (const MArray<Complex>& a) : MArray<Complex> (a) { } |
3585 | 52 |
53 explicit ComplexColumnVector (const ColumnVector& a); | |
458 | 54 |
55 ComplexColumnVector& operator = (const ComplexColumnVector& a) | |
56 { | |
1214 | 57 MArray<Complex>::operator = (a); |
458 | 58 return *this; |
59 } | |
60 | |
2386 | 61 bool operator == (const ComplexColumnVector& a) const; |
62 bool operator != (const ComplexColumnVector& a) const; | |
458 | 63 |
1359 | 64 // destructive insert/delete/reorder operations |
458 | 65 |
5275 | 66 ComplexColumnVector& insert (const ColumnVector& a, octave_idx_type r); |
67 ComplexColumnVector& insert (const ComplexColumnVector& a, octave_idx_type r); | |
458 | 68 |
69 ComplexColumnVector& fill (double val); | |
70 ComplexColumnVector& fill (const Complex& val); | |
5275 | 71 ComplexColumnVector& fill (double val, octave_idx_type r1, octave_idx_type r2); |
72 ComplexColumnVector& fill (const Complex& val, octave_idx_type r1, octave_idx_type r2); | |
458 | 73 |
74 ComplexColumnVector stack (const ColumnVector& a) const; | |
75 ComplexColumnVector stack (const ComplexColumnVector& a) const; | |
76 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7503
diff
changeset
|
77 ComplexRowVector hermitian (void) const; |
458 | 78 ComplexRowVector transpose (void) const; |
79 | |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
80 friend OCTAVE_API ComplexColumnVector conj (const ComplexColumnVector& a); |
458 | 81 |
1359 | 82 // resize is the destructive equivalent for this one |
458 | 83 |
5275 | 84 ComplexColumnVector extract (octave_idx_type r1, octave_idx_type r2) const; |
458 | 85 |
5275 | 86 ComplexColumnVector extract_n (octave_idx_type r1, octave_idx_type n) const; |
4316 | 87 |
1359 | 88 // column vector by column vector -> column vector operations |
458 | 89 |
90 ComplexColumnVector& operator += (const ColumnVector& a); | |
91 ComplexColumnVector& operator -= (const ColumnVector& a); | |
92 | |
1359 | 93 // matrix by column vector -> column vector operations |
1205 | 94 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
95 friend OCTAVE_API ComplexColumnVector operator * (const ComplexMatrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
96 const ColumnVector& b); |
1205 | 97 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
98 friend OCTAVE_API ComplexColumnVector operator * (const ComplexMatrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
99 const ComplexColumnVector& b); |
458 | 100 |
1359 | 101 // matrix by column vector -> column vector operations |
1205 | 102 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
103 friend OCTAVE_API ComplexColumnVector operator * (const Matrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
104 const ComplexColumnVector& b); |
1205 | 105 |
1359 | 106 // diagonal matrix by column vector -> column vector operations |
1205 | 107 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
108 friend OCTAVE_API ComplexColumnVector operator * (const DiagMatrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
109 const ComplexColumnVector& b); |
1205 | 110 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
111 friend OCTAVE_API ComplexColumnVector operator * (const ComplexDiagMatrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
112 const ColumnVector& b); |
1205 | 113 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
114 friend OCTAVE_API ComplexColumnVector operator * (const ComplexDiagMatrix& a, |
10312
cbc402e64d83
untabify liboctave header files
John W. Eaton <jwe@octave.org>
parents:
10158
diff
changeset
|
115 const ComplexColumnVector& b); |
1205 | 116 |
1359 | 117 // other operations |
458 | 118 |
119 Complex min (void) const; | |
120 Complex max (void) const; | |
121 | |
1359 | 122 // i/o |
458 | 123 |
9237
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
124 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ComplexColumnVector& a); |
3c1762c7e787
Add missing xxx_API decoration and remove misplaced ones
Michael Goffioul <michael.goffioul@gmail.com>
parents:
8920
diff
changeset
|
125 friend OCTAVE_API std::istream& operator >> (std::istream& is, ComplexColumnVector& a); |
458 | 126 |
1205 | 127 private: |
128 | |
5275 | 129 ComplexColumnVector (Complex *d, octave_idx_type l) : MArray<Complex> (d, l) { } |
458 | 130 }; |
131 | |
3573 | 132 MARRAY_FORWARD_DEFS (MArray, ComplexColumnVector, Complex) |
133 | |
458 | 134 #endif |