Mercurial > hg > octave-lyh
annotate liboctave/CRowVector.h @ 10010:c5e9931c7ba7
Correctly produce postcript output for geometryimages when QHULL library is not present
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sun, 20 Dec 2009 17:02:57 -0800 |
parents | f80c566bc751 |
children | 4c0cdbe0acca |
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_ComplexRowVector_h) | |
25 #define octave_ComplexRowVector_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 ComplexRowVector : public MArray<Complex> |
458 | 34 { |
35 friend class ComplexColumnVector; | |
36 | |
37 public: | |
38 | |
1214 | 39 ComplexRowVector (void) : MArray<Complex> () { } |
3585 | 40 |
5275 | 41 explicit ComplexRowVector (octave_idx_type n) : MArray<Complex> (n) { } |
3585 | 42 |
9612
66970dd627f6
further liboctave design improvements
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
43 explicit ComplexRowVector (const dim_vector& dv) : MArray<Complex> (dv) { } |
66970dd627f6
further liboctave design improvements
Jaroslav Hajek <highegg@gmail.com>
parents:
8920
diff
changeset
|
44 |
5275 | 45 ComplexRowVector (octave_idx_type n, const Complex& val) : MArray<Complex> (n, val) { } |
3585 | 46 |
47 ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { } | |
48 | |
1214 | 49 ComplexRowVector (const MArray<Complex>& a) : MArray<Complex> (a) { } |
3585 | 50 |
51 explicit ComplexRowVector (const RowVector& a); | |
458 | 52 |
53 ComplexRowVector& operator = (const ComplexRowVector& a) | |
54 { | |
1214 | 55 MArray<Complex>::operator = (a); |
458 | 56 return *this; |
57 } | |
58 | |
2386 | 59 bool operator == (const ComplexRowVector& a) const; |
60 bool operator != (const ComplexRowVector& a) const; | |
458 | 61 |
1359 | 62 // destructive insert/delete/reorder operations |
458 | 63 |
5275 | 64 ComplexRowVector& insert (const RowVector& a, octave_idx_type c); |
65 ComplexRowVector& insert (const ComplexRowVector& a, octave_idx_type c); | |
458 | 66 |
67 ComplexRowVector& fill (double val); | |
68 ComplexRowVector& fill (const Complex& val); | |
5275 | 69 ComplexRowVector& fill (double val, octave_idx_type c1, octave_idx_type c2); |
70 ComplexRowVector& fill (const Complex& val, octave_idx_type c1, octave_idx_type c2); | |
458 | 71 |
72 ComplexRowVector append (const RowVector& a) const; | |
73 ComplexRowVector append (const ComplexRowVector& a) const; | |
74 | |
7789
82be108cc558
First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents:
7503
diff
changeset
|
75 ComplexColumnVector hermitian (void) const; |
458 | 76 ComplexColumnVector transpose (void) const; |
77 | |
78 friend ComplexRowVector conj (const ComplexRowVector& a); | |
79 | |
1359 | 80 // resize is the destructive equivalent for this one |
458 | 81 |
5275 | 82 ComplexRowVector extract (octave_idx_type c1, octave_idx_type c2) const; |
458 | 83 |
5275 | 84 ComplexRowVector extract_n (octave_idx_type c1, octave_idx_type n) const; |
4316 | 85 |
1359 | 86 // row vector by row vector -> row vector operations |
458 | 87 |
88 ComplexRowVector& operator += (const RowVector& a); | |
89 ComplexRowVector& operator -= (const RowVector& a); | |
90 | |
1359 | 91 // row vector by matrix -> row vector |
458 | 92 |
93 friend ComplexRowVector operator * (const ComplexRowVector& a, | |
94 const ComplexMatrix& b); | |
95 | |
1205 | 96 friend ComplexRowVector operator * (const RowVector& a, |
97 const ComplexMatrix& b); | |
98 | |
1359 | 99 // other operations |
458 | 100 |
101 Complex min (void) const; | |
102 Complex max (void) const; | |
103 | |
1359 | 104 // i/o |
458 | 105 |
3504 | 106 friend std::ostream& operator << (std::ostream& os, const ComplexRowVector& a); |
107 friend std::istream& operator >> (std::istream& is, ComplexRowVector& a); | |
458 | 108 |
109 private: | |
110 | |
5275 | 111 ComplexRowVector (Complex *d, octave_idx_type l) : MArray<Complex> (d, l) { } |
458 | 112 }; |
113 | |
1205 | 114 // row vector by column vector -> scalar |
115 | |
116 Complex operator * (const ComplexRowVector& a, const ColumnVector& b); | |
117 | |
118 Complex operator * (const ComplexRowVector& a, const ComplexColumnVector& b); | |
119 | |
120 // other operations | |
121 | |
6108 | 122 OCTAVE_API ComplexRowVector linspace (const Complex& x1, const Complex& x2, octave_idx_type n); |
1196 | 123 |
3573 | 124 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex) |
125 | |
458 | 126 #endif |
127 | |
128 /* | |
129 ;;; Local Variables: *** | |
130 ;;; mode: C++ *** | |
131 ;;; End: *** | |
132 */ |