GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
fCColVector.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2018 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
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 
13 Octave is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License 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 <https://www.gnu.org/licenses/>.
21 
22 */
23 
24 #if ! defined (octave_fCColVector_h)
25 #define octave_fCColVector_h 1
26 
27 #include "octave-config.h"
28 
29 #include "MArray.h"
30 #include "mx-defs.h"
31 
32 class
33 OCTAVE_API
35 {
36  friend class FloatComplexMatrix;
37  friend class FloatComplexRowVector;
38 
39 public:
40 
42  : MArray<FloatComplex> (dim_vector (0, 1)) { }
43 
45  : MArray<FloatComplex> (dim_vector (n, 1)) { }
46 
48  : MArray<FloatComplex> (dv.as_column ()) { }
49 
51  : MArray<FloatComplex> (dim_vector (n, 1), val) { }
52 
54  : MArray<FloatComplex> (a) { }
55 
57  : MArray<FloatComplex> (a.as_column ()) { }
58 
60  : MArray<FloatComplex> (a.as_column ()) { }
61 
63 
65  {
67  return *this;
68  }
69 
70  bool operator == (const FloatComplexColumnVector& a) const;
71  bool operator != (const FloatComplexColumnVector& a) const;
72 
73  // destructive insert/delete/reorder operations
74 
76  octave_idx_type r);
78  octave_idx_type r);
79 
86 
87  FloatComplexColumnVector stack (const FloatColumnVector& a) const;
89 
90  FloatComplexRowVector hermitian (void) const;
91  FloatComplexRowVector transpose (void) const;
92 
93  friend OCTAVE_API FloatComplexColumnVector
95 
96  // resize is the destructive equivalent for this one
97 
99  octave_idx_type r2) const;
100 
102  octave_idx_type n) const;
103 
104  // column vector by column vector -> column vector operations
105 
108 
109  // matrix by column vector -> column vector operations
110 
111  friend OCTAVE_API FloatComplexColumnVector
113 
114  friend OCTAVE_API FloatComplexColumnVector
116 
117  // matrix by column vector -> column vector operations
118 
119  friend OCTAVE_API FloatComplexColumnVector
121 
122  // diagonal matrix by column vector -> column vector operations
123 
124  friend OCTAVE_API FloatComplexColumnVector
126 
127  friend OCTAVE_API FloatComplexColumnVector
129 
130  friend OCTAVE_API FloatComplexColumnVector
132 
133  // other operations
134 
135  FloatComplex min (void) const;
136  FloatComplex max (void) const;
137 
138  FloatColumnVector abs (void) const;
139 
140  // i/o
141 
142  friend OCTAVE_API std::ostream&
143  operator << (std::ostream& os, const FloatComplexColumnVector& a);
144  friend OCTAVE_API std::istream& operator >> (std::istream& is,
146 
147  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
148  {
150  }
151 
153  { Array<FloatComplex>::clear (n, 1); }
154 
155 };
156 
158 
159 #endif
FloatComplexColumnVector operator*(const FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:157
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCColVector.h:147
FloatComplexRowVector & fill(float val)
Definition: fCRowVector.cc:96
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:566
FloatComplexColumnVector(const FloatComplexColumnVector &a)
Definition: fCColVector.h:53
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
FloatComplexRowVector & operator=(const FloatComplexRowVector &a)
Definition: fCRowVector.h:64
FloatComplexColumnVector(octave_idx_type n, const FloatComplex &val)
Definition: fCColVector.h:50
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:4986
static void transpose(octave_idx_type N, const octave_idx_type *ridx, const octave_idx_type *cidx, octave_idx_type *ridx2, octave_idx_type *cidx2)
Definition: symrcm.cc:386
FloatComplexColumnVector hermitian(void) const
Definition: fCRowVector.cc:193
static T abs(T x)
Definition: pr-output.cc:1696
#define MARRAY_FORWARD_DEFS(B, R, T)
Definition: MArray.h:126
calling an anonymous function involves an overhead quite comparable to the overhead of an m file function Passing a handle to a built in function is because the interpreter is not involved in the internal loop For a
Definition: cellfun.cc:400
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:215
FloatComplexColumnVector(const dim_vector &dv)
Definition: fCColVector.h:47
Array< FloatComplex > as_column(void) const
Return the array as a column vector.
Definition: Array.h:370
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
Definition: Array.cc:1010
FloatComplexColumnVector(octave_idx_type n)
Definition: fCColVector.h:44
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:550
void clear(octave_idx_type n)
Definition: fCColVector.h:152
friend class FloatComplexColumnVector
Definition: fCRowVector.h:36
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:85
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:227
void clear(void)
Definition: Array.cc:86
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatComplexRowVector extract_n(octave_idx_type c1, octave_idx_type n) const
Definition: fCRowVector.cc:228
FloatComplexColumnVector operator-=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:157
b
Definition: cellfun.cc:400
FloatComplexColumnVector operator+=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:157
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
FloatComplexRowVector & insert(const FloatRowVector &a, octave_idx_type c)
Definition: fCRowVector.cc:57
FloatComplexColumnVector(const MArray< FloatComplex > &a)
Definition: fCColVector.h:56
write the output to stdout if nargout is
Definition: load-save.cc:1612
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
FloatComplexRowVector extract(octave_idx_type c1, octave_idx_type c2) const
Definition: fCRowVector.cc:213
FloatComplexColumnVector(const Array< FloatComplex > &a)
Definition: fCColVector.h:59
dim_vector dv
Definition: sub2ind.cc:263
octave::stream os
Definition: file-io.cc:627
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:204