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
CRowVector.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_CRowVector_h)
24
#define octave_CRowVector_h 1
25
26
#include "
MArray.h
"
27
#include "
dRowVector.h
"
28
29
#include "
mx-defs.h
"
30
31
class
32
OCTAVE_API
33
ComplexRowVector
:
public
MArray<Complex>
34
{
35
friend
class
ComplexColumnVector
;
36
37
public
:
38
39
ComplexRowVector
(
void
) :
MArray
<
Complex
> (
dim_vector
(1, 0)) { }
40
41
explicit
ComplexRowVector
(
octave_idx_type
n)
42
:
MArray
<
Complex
> (
dim_vector
(1, n)) { }
43
44
explicit
ComplexRowVector
(
const
dim_vector
& dv) :
MArray
<
Complex
> (dv) { }
45
46
ComplexRowVector
(
octave_idx_type
n,
const
Complex
& val)
47
:
MArray
<
Complex
> (
dim_vector
(1, n), val) { }
48
49
ComplexRowVector
(
const
ComplexRowVector
& a) :
MArray
<
Complex
> (a) { }
50
51
ComplexRowVector
(
const
MArray<Complex>
& a)
52
:
MArray
<
Complex
> (a.
as_row
()) { }
53
54
ComplexRowVector
(
const
Array<Complex>
& a)
55
:
MArray
<
Complex
> (a.
as_row
()) { }
56
57
explicit
ComplexRowVector
(
const
RowVector
& a) :
MArray
<
Complex
> (a) { }
58
59
ComplexRowVector
&
operator =
(
const
ComplexRowVector
& a)
60
{
61
MArray<Complex>::operator =
(a);
62
return
*
this
;
63
}
64
65
bool
operator ==
(
const
ComplexRowVector
& a)
const
;
66
bool
operator !=
(
const
ComplexRowVector
& a)
const
;
67
68
// destructive insert/delete/reorder operations
69
70
ComplexRowVector
&
insert
(
const
RowVector
& a,
octave_idx_type
c);
71
ComplexRowVector
&
insert
(
const
ComplexRowVector
& a,
octave_idx_type
c);
72
73
ComplexRowVector
&
fill
(
double
val);
74
ComplexRowVector
&
fill
(
const
Complex
& val);
75
ComplexRowVector
&
fill
(
double
val,
octave_idx_type
c1
,
octave_idx_type
c2);
76
ComplexRowVector
&
fill
(
const
Complex
& val,
77
octave_idx_type
c1
,
octave_idx_type
c2);
78
79
ComplexRowVector
append (
const
RowVector
& a)
const
;
80
ComplexRowVector
append (
const
ComplexRowVector
& a)
const
;
81
82
ComplexColumnVector
hermitian
(
void
)
const
;
83
ComplexColumnVector
transpose
(
void
)
const
;
84
85
friend
ComplexRowVector
conj
(
const
ComplexRowVector
& a);
86
87
// resize is the destructive equivalent for this one
88
89
ComplexRowVector
extract
(
octave_idx_type
c1
,
octave_idx_type
c2)
const
;
90
91
ComplexRowVector
extract_n
(
octave_idx_type
c1
,
octave_idx_type
n)
const
;
92
93
// row vector by row vector -> row vector operations
94
95
ComplexRowVector
&
operator +=
(
const
RowVector
& a);
96
ComplexRowVector
&
operator -=
(
const
RowVector
& a);
97
98
// row vector by matrix -> row vector
99
100
friend
ComplexRowVector
operator *
(
const
ComplexRowVector
& a,
101
const
ComplexMatrix
& b);
102
103
friend
ComplexRowVector
operator *
(
const
RowVector
& a,
104
const
ComplexMatrix
& b);
105
106
// other operations
107
108
Complex
min
(
void
)
const
;
109
Complex
max
(
void
)
const
;
110
111
// i/o
112
113
friend
std::ostream&
operator <<
(std::ostream& os,
114
const
ComplexRowVector
& a);
115
friend
std::istream&
operator >>
(std::istream& is,
ComplexRowVector
& a);
116
117
void
resize
(
octave_idx_type
n,
const
Complex
& rfv =
Complex
(0))
118
{
119
Array<Complex>::resize
(
dim_vector
(1, n), rfv);
120
}
121
122
void
clear
(
octave_idx_type
n)
123
{
Array<Complex>::clear
(1, n); }
124
125
};
126
127
// row vector by column vector -> scalar
128
129
Complex
OCTAVE_API
operator *
(
const
ComplexRowVector
& a,
130
const
ColumnVector
& b);
131
132
Complex
OCTAVE_API
operator *
(
const
ComplexRowVector
& a,
133
const
ComplexColumnVector
& b);
134
135
// other operations
136
137
OCTAVE_API
ComplexRowVector
linspace
(
const
Complex
& x1,
const
Complex
& x2,
138
octave_idx_type
n);
139
140
MARRAY_FORWARD_DEFS
(
MArray
,
ComplexRowVector
,
Complex
)
141
142
#endif
Generated on Mon Dec 30 2013 03:04:40 for GNU Octave by
1.8.1.2