GNU Octave  4.0.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-2015 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
FloatComplexColumnVector operator*(const FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:156
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCColVector.h:146
FloatComplexRowVector & fill(float val)
Definition: fCRowVector.cc:122
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:548
FloatComplexColumnVector(const FloatComplexColumnVector &a)
Definition: fCColVector.h:52
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
FloatComplexRowVector & operator=(const FloatComplexRowVector &a)
Definition: fCRowVector.h:63
FloatComplexColumnVector(octave_idx_type n, const FloatComplex &val)
Definition: fCColVector.h:49
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:382
FloatComplexRowVector extract_n(octave_idx_type c1, octave_idx_type n) const
Definition: fCRowVector.cc:260
Array< FloatComplex > as_column(void) const
Return the array as a column vector.
Definition: Array.h:279
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type octave_idx_type r2
FloatComplexRowVector extract(octave_idx_type c1, octave_idx_type c2) const
Definition: fCRowVector.cc:245
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:244
FloatComplexColumnVector(const dim_vector &dv)
Definition: fCColVector.h:46
void resize(const dim_vector &dv, const T &rfv)
Definition: Array.cc:1033
FloatComplexColumnVector(octave_idx_type n)
Definition: fCColVector.h:43
#define MARRAY_FORWARD_DEFS(B, R, T)
Definition: MArray-decl.h:236
FloatComplexColumnVector hermitian(void) const
Definition: fCRowVector.cc:225
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:519
void clear(octave_idx_type n)
Definition: fCColVector.h:151
friend class FloatComplexColumnVector
Definition: fCRowVector.h:35
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:233
void clear(void)
Definition: Array.cc:84
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatComplexColumnVector operator-=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:156
FloatComplexColumnVector operator+=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:156
std::complex< float > FloatComplex
Definition: oct-cmplx.h:30
FloatComplexRowVector & insert(const FloatRowVector &a, octave_idx_type c)
Definition: fCRowVector.cc:77
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type r1
FloatComplexColumnVector(const MArray< FloatComplex > &a)
Definition: fCColVector.h:55
T abs(T x)
Definition: pr-output.cc:3062
FloatComplexColumnVector(const Array< FloatComplex > &a)
Definition: fCColVector.h:58
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:65
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:210