GNU Octave
3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
liboctave
array
fCDiagMatrix.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 1994-2013 John W. Eaton
4
5
This file is part of Octave.
6
7
Octave is free software; you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by the
9
Free Software Foundation; either version 3 of the License, or (at your
10
option) any later version.
11
12
Octave is distributed in the hope that it will be useful, but WITHOUT
13
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<http://www.gnu.org/licenses/>.
20
21
*/
22
23
#if !defined (octave_fCDiagMatrix_h)
24
#define octave_fCDiagMatrix_h 1
25
26
#include "
MDiagArray2.h
"
27
28
#include "
fRowVector.h
"
29
#include "
fCRowVector.h
"
30
#include "
fColVector.h
"
31
#include "
fCColVector.h
"
32
#include "
DET.h
"
33
34
#include "
mx-defs.h
"
35
36
class
37
OCTAVE_API
38
FloatComplexDiagMatrix
:
public
MDiagArray2<FloatComplex>
39
{
40
public
:
41
42
FloatComplexDiagMatrix
(
void
) :
MDiagArray2
<
FloatComplex
> () { }
43
44
FloatComplexDiagMatrix
(
octave_idx_type
r,
45
octave_idx_type
c)
46
:
MDiagArray2
<
FloatComplex
> (r, c) { }
47
48
FloatComplexDiagMatrix
(
octave_idx_type
r,
octave_idx_type
c,
49
const
FloatComplex
& val)
50
:
MDiagArray2
<
FloatComplex
> (r, c, val) { }
51
52
explicit
FloatComplexDiagMatrix
(
const
Array<FloatComplex>
& a)
53
:
MDiagArray2
<
FloatComplex
> (a) { }
54
55
FloatComplexDiagMatrix
(
const
Array<FloatComplex>
& a,
octave_idx_type
r,
56
octave_idx_type
c)
57
:
MDiagArray2
<
FloatComplex
> (a, r, c) { }
58
59
explicit
FloatComplexDiagMatrix
(
const
Array<float>
& a)
60
:
MDiagArray2
<
FloatComplex
> (
Array
<
FloatComplex
> (a)) { }
61
62
explicit
FloatComplexDiagMatrix
(
const
FloatDiagMatrix
& a);
63
64
FloatComplexDiagMatrix
(
const
MDiagArray2<FloatComplex>
& a)
65
:
MDiagArray2
<
FloatComplex
> (a) { }
66
67
FloatComplexDiagMatrix
(
const
FloatComplexDiagMatrix
& a)
68
:
MDiagArray2
<
FloatComplex
> (a) { }
69
70
template
<
class
U>
71
FloatComplexDiagMatrix
(
const
DiagArray2<U>
& a)
72
:
MDiagArray2
<
FloatComplex
> (a) { }
73
74
FloatComplexDiagMatrix
&
operator =
(
const
FloatComplexDiagMatrix
& a)
75
{
76
MDiagArray2<FloatComplex>::operator =
(a);
77
return
*
this
;
78
}
79
80
bool
operator ==
(
const
FloatComplexDiagMatrix
& a)
const
;
81
bool
operator !=
(
const
FloatComplexDiagMatrix
& a)
const
;
82
83
FloatComplexDiagMatrix
&
fill
(
float
val);
84
FloatComplexDiagMatrix
&
fill
(
const
FloatComplex
& val);
85
FloatComplexDiagMatrix
&
fill
(
float
val,
86
octave_idx_type
beg,
octave_idx_type
end);
87
FloatComplexDiagMatrix
&
fill
(
const
FloatComplex
& val,
88
octave_idx_type
beg,
octave_idx_type
end);
89
FloatComplexDiagMatrix
&
fill
(
const
FloatColumnVector
& a);
90
FloatComplexDiagMatrix
&
fill
(
const
FloatComplexColumnVector
& a);
91
FloatComplexDiagMatrix
&
fill
(
const
FloatRowVector
& a);
92
FloatComplexDiagMatrix
&
fill
(
const
FloatComplexRowVector
& a);
93
FloatComplexDiagMatrix
&
fill
(
const
FloatColumnVector
& a,
94
octave_idx_type
beg);
95
FloatComplexDiagMatrix
&
fill
(
const
FloatComplexColumnVector
& a,
96
octave_idx_type
beg);
97
FloatComplexDiagMatrix
&
fill
(
const
FloatRowVector
& a,
octave_idx_type
beg);
98
FloatComplexDiagMatrix
&
fill
(
const
FloatComplexRowVector
& a,
99
octave_idx_type
beg);
100
101
FloatComplexDiagMatrix
hermitian
(
void
)
const
102
{
return
MDiagArray2<FloatComplex>::hermitian
(
std::conj
); }
103
FloatComplexDiagMatrix
transpose
(
void
)
const
104
{
return
MDiagArray2<FloatComplex>::transpose
(); }
105
FloatDiagMatrix
abs
(
void
)
const
;
106
107
friend
OCTAVE_API
FloatComplexDiagMatrix
108
conj
(
const
FloatComplexDiagMatrix
& a);
109
110
// resize is the destructive analog for this one
111
112
FloatComplexMatrix
extract
(
octave_idx_type
r1
,
octave_idx_type
c1
,
113
octave_idx_type
r2
,
octave_idx_type
c2)
const
;
114
115
// extract row or column i
116
117
FloatComplexRowVector
row (
octave_idx_type
i)
const
;
118
FloatComplexRowVector
row (
char
*s)
const
;
119
120
FloatComplexColumnVector
column
(
octave_idx_type
i)
const
;
121
FloatComplexColumnVector
column
(
char
*s)
const
;
122
123
FloatComplexDiagMatrix
inverse (
octave_idx_type
& info)
const
;
124
FloatComplexDiagMatrix
inverse (
void
)
const
;
125
FloatComplexDiagMatrix
pseudo_inverse (
void
)
const
;
126
127
bool
all_elements_are_real (
void
)
const
;
128
129
// diagonal matrix by diagonal matrix -> diagonal matrix operations
130
131
FloatComplexDiagMatrix
&
operator +=
(
const
FloatDiagMatrix
& a);
132
FloatComplexDiagMatrix
&
operator -=
(
const
FloatDiagMatrix
& a);
133
134
// other operations
135
136
FloatComplexColumnVector
extract_diag (
octave_idx_type
k = 0)
const
137
{
return
MDiagArray2<FloatComplex>::extract_diag
(k); }
138
139
FloatComplexDET
determinant (
void
)
const
;
140
float
rcond (
void
)
const
;
141
142
// i/o
143
144
friend
std::ostream&
operator <<
(std::ostream& os,
145
const
FloatComplexDiagMatrix
& a);
146
147
};
148
149
OCTAVE_API
FloatComplexDiagMatrix
conj
(
const
FloatComplexDiagMatrix
& a);
150
151
// diagonal matrix by diagonal matrix -> diagonal matrix operations
152
153
OCTAVE_API
FloatComplexDiagMatrix
154
operator *
(
const
FloatComplexDiagMatrix
& a,
const
FloatComplexDiagMatrix
& b);
155
156
OCTAVE_API
FloatComplexDiagMatrix
157
operator *
(
const
FloatComplexDiagMatrix
& a,
const
FloatDiagMatrix
& b);
158
159
OCTAVE_API
FloatComplexDiagMatrix
160
operator *
(
const
FloatDiagMatrix
& a,
const
FloatComplexDiagMatrix
& b);
161
162
MDIAGARRAY2_FORWARD_DEFS
(
MDiagArray2
,
FloatComplexDiagMatrix
,
FloatComplex
)
163
164
#endif
Generated on Mon Dec 30 2013 03:04:42 for GNU Octave by
1.8.1.2