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
CColVector.h
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 1994-2013 John W. Eaton
4
Copyright (C) 2010 VZLU Prague
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
10
Free Software Foundation; either version 3 of the License, or (at your
11
option) any later version.
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
19
along with Octave; see the file COPYING. If not, see
20
<http://www.gnu.org/licenses/>.
21
22
*/
23
24
#if !defined (octave_CColVector_h)
25
#define octave_CColVector_h 1
26
27
#include "
MArray.h
"
28
29
#include "
mx-defs.h
"
30
31
class
32
OCTAVE_API
33
ComplexColumnVector
:
public
MArray<Complex>
34
{
35
friend
class
ComplexMatrix
;
36
friend
class
ComplexRowVector
;
37
38
public
:
39
40
ComplexColumnVector
(
void
) :
MArray
<
Complex
> (
dim_vector
(0, 1)) { }
41
42
explicit
ComplexColumnVector
(
octave_idx_type
n)
43
:
MArray
<
Complex
> (
dim_vector
(n, 1)) { }
44
45
explicit
ComplexColumnVector
(
const
dim_vector
& dv)
46
:
MArray
<
Complex
> (dv.
as_column
()) { }
47
48
ComplexColumnVector
(
octave_idx_type
n,
const
Complex
& val)
49
:
MArray
<
Complex
> (
dim_vector
(n, 1), val) { }
50
51
ComplexColumnVector
(
const
ComplexColumnVector
& a) :
MArray
<
Complex
> (a) { }
52
53
ComplexColumnVector
(
const
MArray<Complex>
& a)
54
:
MArray
<
Complex
> (a.
as_column
()) { }
55
56
ComplexColumnVector
(
const
Array<Complex>
& a)
57
:
MArray
<
Complex
> (a.
as_column
()) { }
58
59
explicit
ComplexColumnVector
(
const
ColumnVector
& a);
60
61
ComplexColumnVector
&
operator =
(
const
ComplexColumnVector
& a)
62
{
63
MArray<Complex>::operator =
(a);
64
return
*
this
;
65
}
66
67
bool
operator ==
(
const
ComplexColumnVector
& a)
const
;
68
bool
operator !=
(
const
ComplexColumnVector
& a)
const
;
69
70
// destructive insert/delete/reorder operations
71
72
ComplexColumnVector
&
insert
(
const
ColumnVector
& a,
octave_idx_type
r);
73
ComplexColumnVector
&
insert
(
const
ComplexColumnVector
& a,
octave_idx_type
r);
74
75
ComplexColumnVector
&
fill
(
double
val);
76
ComplexColumnVector
&
fill
(
const
Complex
& val);
77
ComplexColumnVector
&
fill
(
double
val,
78
octave_idx_type
r1
,
octave_idx_type
r2
);
79
ComplexColumnVector
&
fill
(
const
Complex
& val,
80
octave_idx_type
r1
,
octave_idx_type
r2
);
81
82
ComplexColumnVector
stack (
const
ColumnVector
& a)
const
;
83
ComplexColumnVector
stack (
const
ComplexColumnVector
& a)
const
;
84
85
ComplexRowVector
hermitian
(
void
)
const
;
86
ComplexRowVector
transpose
(
void
)
const
;
87
88
friend
OCTAVE_API
ComplexColumnVector
conj
(
const
ComplexColumnVector
& a);
89
90
// resize is the destructive equivalent for this one
91
92
ComplexColumnVector
extract
(
octave_idx_type
r1
,
octave_idx_type
r2
)
const
;
93
94
ComplexColumnVector
extract_n
(
octave_idx_type
r1
,
octave_idx_type
n)
const
;
95
96
// column vector by column vector -> column vector operations
97
98
ComplexColumnVector
&
operator +=
(
const
ColumnVector
& a);
99
ComplexColumnVector
&
operator -=
(
const
ColumnVector
& a);
100
101
// matrix by column vector -> column vector operations
102
103
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
ComplexMatrix
& a,
104
const
ColumnVector
& b);
105
106
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
ComplexMatrix
& a,
107
const
ComplexColumnVector
& b);
108
109
// matrix by column vector -> column vector operations
110
111
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
Matrix
& a,
112
const
ComplexColumnVector
& b);
113
114
// diagonal matrix by column vector -> column vector operations
115
116
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
DiagMatrix
& a,
117
const
ComplexColumnVector
& b);
118
119
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
ComplexDiagMatrix
& a,
120
const
ColumnVector
& b);
121
122
friend
OCTAVE_API
ComplexColumnVector
operator *
(
const
ComplexDiagMatrix
& a,
123
const
ComplexColumnVector
& b);
124
125
// other operations
126
127
Complex
min
(
void
)
const
;
128
Complex
max
(
void
)
const
;
129
130
ColumnVector
abs
(
void
)
const
;
131
132
// i/o
133
134
friend
OCTAVE_API std::ostream&
operator <<
(std::ostream& os,
135
const
ComplexColumnVector
& a);
136
friend
OCTAVE_API std::istream&
operator >>
(std::istream& is,
137
ComplexColumnVector
& a);
138
139
void
resize
(
octave_idx_type
n,
const
Complex
& rfv =
Complex
(0))
140
{
141
Array<Complex>::resize
(
dim_vector
(n, 1), rfv);
142
}
143
144
void
clear
(
octave_idx_type
n)
145
{
Array<Complex>::clear
(n, 1); }
146
147
};
148
149
MARRAY_FORWARD_DEFS
(
MArray
,
ComplexColumnVector
,
Complex
)
150
151
#endif
Generated on Mon Dec 30 2013 03:04:39 for GNU Octave by
1.8.1.2