annotate liboctave/CRowVector.h @ 5262:57b5030f5737 before-64-bit-merge

[project @ 2005-03-31 03:03:07 by jwe]
author jwe
date Thu, 31 Mar 2005 03:03:07 +0000
parents e35b034d3523
children 23b37da9fd5b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
1 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2676
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
4
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
6
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
10 later version.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
11
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
15 for more details.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
16
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1296
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
20
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
21 */
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
22
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
23 #if !defined (octave_ComplexRowVector_h)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
24 #define octave_ComplexRowVector_h 1
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
25
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
26 #include "MArray.h"
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
27
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
28 #include "mx-defs.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
29
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
30 class
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
31 ComplexRowVector : public MArray<Complex>
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
32 {
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
33 friend class ComplexColumnVector;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
34
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
35 public:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
36
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
37 ComplexRowVector (void) : MArray<Complex> () { }
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
38
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
39 explicit ComplexRowVector (int n) : MArray<Complex> (n) { }
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
40
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
41 ComplexRowVector (int n, const Complex& val) : MArray<Complex> (n, val) { }
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
42
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
43 ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { }
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
44
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
45 ComplexRowVector (const MArray<Complex>& a) : MArray<Complex> (a) { }
3585
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
46
d9803711e047 [project @ 2000-02-08 04:35:39 by jwe]
jwe
parents: 3582
diff changeset
47 explicit ComplexRowVector (const RowVector& a);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
48
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
49 ComplexRowVector& operator = (const ComplexRowVector& a)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
50 {
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
51 MArray<Complex>::operator = (a);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
52 return *this;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
53 }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
54
2386
4fc9fd1424a9 [project @ 1996-10-12 18:31:34 by jwe]
jwe
parents: 1993
diff changeset
55 bool operator == (const ComplexRowVector& a) const;
4fc9fd1424a9 [project @ 1996-10-12 18:31:34 by jwe]
jwe
parents: 1993
diff changeset
56 bool operator != (const ComplexRowVector& a) const;
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
57
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
58 // destructive insert/delete/reorder operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
59
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
60 ComplexRowVector& insert (const RowVector& a, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
61 ComplexRowVector& insert (const ComplexRowVector& a, int c);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
62
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
63 ComplexRowVector& fill (double val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
64 ComplexRowVector& fill (const Complex& val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
65 ComplexRowVector& fill (double val, int c1, int c2);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
66 ComplexRowVector& fill (const Complex& val, int c1, int c2);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
67
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
68 ComplexRowVector append (const RowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
69 ComplexRowVector append (const ComplexRowVector& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
70
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
71 ComplexColumnVector hermitian (void) const; // complex conjugate transpose.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
72 ComplexColumnVector transpose (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
73
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
74 friend ComplexRowVector conj (const ComplexRowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
75
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
76 // resize is the destructive equivalent for this one
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
77
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
78 ComplexRowVector extract (int c1, int c2) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
79
4316
236c10efcde2 [project @ 2003-02-10 21:57:15 by jwe]
jwe
parents: 4192
diff changeset
80 ComplexRowVector extract_n (int c1, int n) const;
236c10efcde2 [project @ 2003-02-10 21:57:15 by jwe]
jwe
parents: 4192
diff changeset
81
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
82 // row vector by row vector -> row vector operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
83
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
84 ComplexRowVector& operator += (const RowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
85 ComplexRowVector& operator -= (const RowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
86
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
87 // row vector by matrix -> row vector
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
88
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
89 friend ComplexRowVector operator * (const ComplexRowVector& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
90 const ComplexMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
91
1205
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
92 friend ComplexRowVector operator * (const RowVector& a,
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
93 const ComplexMatrix& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
94
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
95 // other operations
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
96
2676
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2386
diff changeset
97 ComplexRowVector map (c_c_Mapper f) const;
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2386
diff changeset
98 RowVector map (d_c_Mapper f) const;
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2386
diff changeset
99
a5a300c61159 [project @ 1997-02-14 03:16:06 by jwe]
jwe
parents: 2386
diff changeset
100 ComplexRowVector& apply (c_c_Mapper f);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
101
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
102 Complex min (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
103 Complex max (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
104
1359
a6994c934a50 [project @ 1995-09-05 21:30:26 by jwe]
jwe
parents: 1315
diff changeset
105 // i/o
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
106
3504
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2847
diff changeset
107 friend std::ostream& operator << (std::ostream& os, const ComplexRowVector& a);
5eef8a2294bd [project @ 2000-02-01 10:06:51 by jwe]
jwe
parents: 2847
diff changeset
108 friend std::istream& operator >> (std::istream& is, ComplexRowVector& a);
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
109
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
110 private:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
111
1214
0bf4d2b7def4 [project @ 1995-04-06 02:33:59 by jwe]
jwe
parents: 1205
diff changeset
112 ComplexRowVector (Complex *d, int l) : MArray<Complex> (d, l) { }
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
113 };
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
114
1205
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
115 // row vector by column vector -> scalar
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
116
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
117 Complex operator * (const ComplexRowVector& a, const ColumnVector& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
118
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
119 Complex operator * (const ComplexRowVector& a, const ComplexColumnVector& b);
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
120
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
121 // other operations
8302fab9fe24 [project @ 1995-04-04 02:05:01 by jwe]
jwe
parents: 1196
diff changeset
122
1196
c01e881ccbb1 [project @ 1995-03-31 17:12:19 by jwe]
jwe
parents: 1195
diff changeset
123 ComplexRowVector linspace (const Complex& x1, const Complex& x2, int n);
c01e881ccbb1 [project @ 1995-03-31 17:12:19 by jwe]
jwe
parents: 1195
diff changeset
124
3573
6ae6f1180e62 [project @ 2000-02-04 09:01:59 by jwe]
jwe
parents: 3504
diff changeset
125 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex)
6ae6f1180e62 [project @ 2000-02-04 09:01:59 by jwe]
jwe
parents: 3504
diff changeset
126
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
127 #endif
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
128
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
129 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
130 ;;; Local Variables: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
131 ;;; mode: C++ ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
132 ;;; End: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
133 */