GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
34 {
36 
37 public:
38 
40  : MArray<FloatComplex> (dim_vector (1, 0)) { }
41 
43  : MArray<FloatComplex> (dim_vector (1, n)) { }
44 
45  explicit FloatComplexRowVector (const dim_vector& dv)
46  : MArray<FloatComplex> (dv.as_row ()) { }
47 
49  : MArray<FloatComplex> (dim_vector (1, n), val) { }
50 
52  : MArray<FloatComplex> (a) { }
53 
55  : MArray<FloatComplex> (a.as_row ()) { }
56 
58  : MArray<FloatComplex> (a.as_row ()) { }
59 
61  : MArray<FloatComplex> (a) { }
62 
64  {
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 
76  octave_idx_type c);
77 
78  FloatComplexRowVector& fill (float val);
80  FloatComplexRowVector& fill (float val,
84 
85  FloatComplexRowVector append (const FloatRowVector& a) const;
86  FloatComplexRowVector append (const FloatComplexRowVector& a) const;
87 
90 
92 
93  // resize is the destructive equivalent for this one
94 
96 
98 
99  // row vector by row vector -> row vector operations
100 
103 
104  // row vector by matrix -> row vector
105 
107  const FloatComplexMatrix& b);
108 
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,
123 
124  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
125  {
127  }
128 
130  { Array<FloatComplex>::clear (1, n); }
131 
132 };
133 
134 // row vector by column vector -> scalar
135 
137  const ColumnVector& b);
138 
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 
148 
149 #endif