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
fCColVector.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_fCColVector_h)
25 #define octave_fCColVector_h 1
26 
27 #include "MArray.h"
28 
29 #include "mx-defs.h"
30 
31 class
32 OCTAVE_API
34 {
35  friend class FloatComplexMatrix;
36  friend class FloatComplexRowVector;
37 
38 public:
39 
41  : MArray<FloatComplex> (dim_vector (0, 1)) { }
42 
44  : MArray<FloatComplex> (dim_vector (n, 1)) { }
45 
46  explicit FloatComplexColumnVector (const dim_vector& dv)
47  : MArray<FloatComplex> (dv.as_column ()) { }
48 
50  : MArray<FloatComplex> (dim_vector (n, 1), val) { }
51 
53  : MArray<FloatComplex> (a) { }
54 
56  : MArray<FloatComplex> (a.as_column ()) { }
57 
59  : MArray<FloatComplex> (a.as_column ()) { }
60 
61  explicit FloatComplexColumnVector (const FloatColumnVector& a);
62 
64  {
66  return *this;
67  }
68 
69  bool operator == (const FloatComplexColumnVector& a) const;
70  bool operator != (const FloatComplexColumnVector& a) const;
71 
72  // destructive insert/delete/reorder operations
73 
75  octave_idx_type r);
77  octave_idx_type r);
78 
79  FloatComplexColumnVector& fill (float val);
81  FloatComplexColumnVector& fill (float val,
85 
86  FloatComplexColumnVector stack (const FloatColumnVector& a) const;
88 
89  FloatComplexRowVector hermitian (void) const;
90  FloatComplexRowVector transpose (void) const;
91 
92  friend OCTAVE_API FloatComplexColumnVector
93  conj (const FloatComplexColumnVector& a);
94 
95  // resize is the destructive equivalent for this one
96 
98  octave_idx_type r2) const;
99 
101  octave_idx_type n) const;
102 
103  // column vector by column vector -> column vector operations
104 
107 
108  // matrix by column vector -> column vector operations
109 
110  friend OCTAVE_API FloatComplexColumnVector
112 
113  friend OCTAVE_API FloatComplexColumnVector
115 
116  // matrix by column vector -> column vector operations
117 
118  friend OCTAVE_API FloatComplexColumnVector
120 
121  // diagonal matrix by column vector -> column vector operations
122 
123  friend OCTAVE_API FloatComplexColumnVector
125 
126  friend OCTAVE_API FloatComplexColumnVector
127  operator * (const FloatComplexDiagMatrix& a, const ColumnVector& b);
128 
129  friend OCTAVE_API FloatComplexColumnVector
131 
132  // other operations
133 
134  FloatComplex min (void) const;
135  FloatComplex max (void) const;
136 
137  FloatColumnVector abs (void) const;
138 
139  // i/o
140 
141  friend OCTAVE_API std::ostream&
142  operator << (std::ostream& os, const FloatComplexColumnVector& a);
143  friend OCTAVE_API std::istream& operator >> (std::istream& is,
145 
146  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
147  {
149  }
150 
152  { Array<FloatComplex>::clear (n, 1); }
153 
154 };
155 
157 
158 #endif