annotate liboctave/CDiagMatrix.h @ 1011:18933dbd5e43

[project @ 1995-01-04 04:18:15 by jwe]
author jwe
date Wed, 04 Jan 1995 04:19:24 +0000
parents 714fd17fca28
children 8302fab9fe24
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 // -*- C++ -*-
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
2 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
3
1011
18933dbd5e43 [project @ 1995-01-04 04:18:15 by jwe]
jwe
parents: 882
diff changeset
4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
5
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
7
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
8 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
9 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
10 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
11 later version.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
12
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
13 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
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
15 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
16 for more details.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
17
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
18 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
19 along with Octave; see the file COPYING. If not, write to the Free
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
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
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_ComplexDiagMatrix_h)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
25 #define octave_ComplexDiagMatrix_h 1
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
26
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
27 #include "Array.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
28
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
29 #include "dRowVector.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
30 #include "CRowVector.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
31 #include "dColVector.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
32 #include "CColVector.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
33
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
34 #include "mx-defs.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
35
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
36 extern "C++" {
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
37
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
38 class ComplexDiagMatrix : public DiagArray<Complex>
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
39 {
532
2ca256b77602 [project @ 1994-07-20 19:56:55 by jwe]
jwe
parents: 458
diff changeset
40 friend DiagMatrix;
2ca256b77602 [project @ 1994-07-20 19:56:55 by jwe]
jwe
parents: 458
diff changeset
41
458
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
42 public:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
43
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
44 ComplexDiagMatrix (void) : DiagArray<Complex> () { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
45 ComplexDiagMatrix (int n) : DiagArray<Complex> (n) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
46 ComplexDiagMatrix (int n, const Complex& val)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
47 : DiagArray<Complex> (n, val) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
48 ComplexDiagMatrix (int r, int c) : DiagArray<Complex> (r, c) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
49 ComplexDiagMatrix (int r, int c, const Complex& val)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
50 : DiagArray<Complex> (r, c, val) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
51 ComplexDiagMatrix (const RowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
52 ComplexDiagMatrix (const ComplexRowVector& a) : DiagArray<Complex> (a) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
53 ComplexDiagMatrix (const ColumnVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
54 ComplexDiagMatrix (const ComplexColumnVector& a)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
55 : DiagArray<Complex> (a) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
56 ComplexDiagMatrix (const DiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
57 ComplexDiagMatrix (const DiagArray<Complex>& a)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
58 : DiagArray<Complex> (a) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
59 ComplexDiagMatrix (const ComplexDiagMatrix& a) : DiagArray<Complex> (a) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
60 // ComplexDiagMatrix (const Complex& a) : DiagArray<Complex> (1, a) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
61
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
62 ComplexDiagMatrix& operator = (const ComplexDiagMatrix& a)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
63 {
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
64 DiagArray<Complex>::operator = (a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
65 return *this;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
66 }
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 // operator DiagArray<Complex>& () const { return *this; }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
69
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
70 int operator == (const ComplexDiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
71 int operator != (const ComplexDiagMatrix& a) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
72
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
73 ComplexDiagMatrix& fill (double val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
74 ComplexDiagMatrix& fill (const Complex& val);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
75 ComplexDiagMatrix& fill (double val, int beg, int end);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
76 ComplexDiagMatrix& fill (const Complex& val, int beg, int end);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
77 ComplexDiagMatrix& fill (const ColumnVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
78 ComplexDiagMatrix& fill (const ComplexColumnVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
79 ComplexDiagMatrix& fill (const RowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
80 ComplexDiagMatrix& fill (const ComplexRowVector& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
81 ComplexDiagMatrix& fill (const ColumnVector& a, int beg);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
82 ComplexDiagMatrix& fill (const ComplexColumnVector& a, int beg);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
83 ComplexDiagMatrix& fill (const RowVector& a, int beg);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
84 ComplexDiagMatrix& fill (const ComplexRowVector& a, int beg);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
85
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
86 ComplexDiagMatrix hermitian (void) const; // complex conjugate transpose
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
87 ComplexDiagMatrix transpose (void) const;
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 DiagMatrix real (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
90 friend DiagMatrix imag (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
91 friend ComplexDiagMatrix conj (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
92
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
93 // resize is the destructive analog for this one
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
94
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
95 ComplexMatrix extract (int r1, int c1, int r2, int c2) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
96
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
97 // extract row or column i.
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
98
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
99 ComplexRowVector row (int i) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
100 ComplexRowVector row (char *s) const;
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 ComplexColumnVector column (int i) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
103 ComplexColumnVector column (char *s) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
104
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
105 ComplexDiagMatrix inverse (int& info) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
106 ComplexDiagMatrix inverse (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
107
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
108 // diagonal matrix by diagonal matrix -> diagonal matrix operations
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 ComplexDiagMatrix& operator += (const DiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
111 ComplexDiagMatrix& operator -= (const DiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
112
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
113 ComplexDiagMatrix& operator += (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
114 ComplexDiagMatrix& operator -= (const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
115
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
116 // diagonal matrix by scalar -> matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
117
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
118 friend ComplexMatrix operator + (const ComplexDiagMatrix& a, double s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
119 friend ComplexMatrix operator - (const ComplexDiagMatrix& a, double s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
120
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
121 friend ComplexMatrix operator + (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
122 const Complex& s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
123 friend ComplexMatrix operator - (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
124 const Complex& s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
125
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
126 // diagonal matrix by scalar -> diagonal matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
127
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
128 friend ComplexDiagMatrix operator * (const ComplexDiagMatrix& a, double s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
129 friend ComplexDiagMatrix operator / (const ComplexDiagMatrix& a, double s);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
130
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
131 // scalar by diagonal matrix -> matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
132
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
133 friend ComplexMatrix operator + (double s, const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
134 friend ComplexMatrix operator - (double s, const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
135
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
136 friend ComplexMatrix operator + (const Complex& s,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
137 const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
138 friend ComplexMatrix operator - (const Complex& s,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
139 const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
140
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
141 // scalar by diagonal matrix -> diagonal matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
142
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
143 friend ComplexDiagMatrix operator * (double s, const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
144
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
145 // diagonal matrix by column vector -> column vector operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
146
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
147 friend ComplexColumnVector operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
148 const ColumnVector& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
149
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
150 friend ComplexColumnVector operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
151 const ComplexColumnVector& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
152
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
153 // diagonal matrix by diagonal matrix -> diagonal matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
154
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
155 friend ComplexDiagMatrix operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
156 const ComplexDiagMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
157
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
158 friend ComplexDiagMatrix operator + (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
159 const DiagMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
160 friend ComplexDiagMatrix operator - (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
161 const DiagMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
162 friend ComplexDiagMatrix operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
163 const DiagMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
164
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
165 friend ComplexDiagMatrix product (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
166 const DiagMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
167
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
168 // diagonal matrix by matrix -> matrix operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
169
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
170 friend ComplexMatrix operator + (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
171 const Matrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
172 friend ComplexMatrix operator - (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
173 const Matrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
174 friend ComplexMatrix operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
175 const Matrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
176
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
177 friend ComplexMatrix operator + (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
178 const ComplexMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
179 friend ComplexMatrix operator - (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
180 const ComplexMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
181 friend ComplexMatrix operator * (const ComplexDiagMatrix& a,
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
182 const ComplexMatrix& b);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
183
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
184 // other operations
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
185
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
186 ComplexColumnVector diag (void) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
187 ComplexColumnVector diag (int k) const;
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
188
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
189 // i/o
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
190
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
191 friend ostream& operator << (ostream& os, const ComplexDiagMatrix& a);
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
192
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
193 #define KLUDGE_DIAG_MATRICES
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
194 #define TYPE Complex
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
195 #define KL_DMAT_TYPE ComplexDiagMatrix
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
196 #include "mx-kludge.h"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
197 #undef KLUDGE_DIAG_MATRICES
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
198 #undef TYPE
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
199 #undef KL_DMAT_TYPE
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
200
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
201 private:
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
202
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
203 ComplexDiagMatrix (Complex *d, int nr, int nc)
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
204 : DiagArray<Complex> (d, nr, nc) { }
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
205 };
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
206
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
207 } // extern "C++"
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
208
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
209 #endif
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
210
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
211 /*
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
212 ;;; Local Variables: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
213 ;;; mode: C++ ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
214 ;;; page-delimiter: "^/\\*" ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
215 ;;; End: ***
38cb88095913 [project @ 1994-06-06 00:41:10 by jwe]
jwe
parents:
diff changeset
216 */