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