GNU Octave  4.2.1
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-2017 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 "octave-config.h"
28 
29 #include "MArray.h"
30 
31 #include "mx-defs.h"
32 
33 class
34 OCTAVE_API
36 {
37  friend class FloatComplexMatrix;
38  friend class FloatComplexRowVector;
39 
40 public:
41 
43  : MArray<FloatComplex> (dim_vector (0, 1)) { }
44 
46  : MArray<FloatComplex> (dim_vector (n, 1)) { }
47 
49  : MArray<FloatComplex> (dv.as_column ()) { }
50 
52  : MArray<FloatComplex> (dim_vector (n, 1), val) { }
53 
55  : MArray<FloatComplex> (a) { }
56 
58  : MArray<FloatComplex> (a.as_column ()) { }
59 
61  : MArray<FloatComplex> (a.as_column ()) { }
62 
64 
66  {
68  return *this;
69  }
70 
71  bool operator == (const FloatComplexColumnVector& a) const;
72  bool operator != (const FloatComplexColumnVector& a) const;
73 
74  // destructive insert/delete/reorder operations
75 
77  octave_idx_type r);
79  octave_idx_type r);
80 
87 
88  FloatComplexColumnVector stack (const FloatColumnVector& a) const;
90 
91  FloatComplexRowVector hermitian (void) const;
92  FloatComplexRowVector transpose (void) const;
93 
94  friend OCTAVE_API FloatComplexColumnVector
96 
97  // resize is the destructive equivalent for this one
98 
100  octave_idx_type r2) const;
101 
103  octave_idx_type n) const;
104 
105  // column vector by column vector -> column vector operations
106 
109 
110  // matrix by column vector -> column vector operations
111 
112  friend OCTAVE_API FloatComplexColumnVector
114 
115  friend OCTAVE_API FloatComplexColumnVector
117 
118  // matrix by column vector -> column vector operations
119 
120  friend OCTAVE_API FloatComplexColumnVector
122 
123  // diagonal matrix by column vector -> column vector operations
124 
125  friend OCTAVE_API FloatComplexColumnVector
127 
128  friend OCTAVE_API FloatComplexColumnVector
130 
131  friend OCTAVE_API FloatComplexColumnVector
133 
134  // other operations
135 
136  FloatComplex min (void) const;
137  FloatComplex max (void) const;
138 
139  FloatColumnVector abs (void) const;
140 
141  // i/o
142 
143  friend OCTAVE_API std::ostream&
144  operator << (std::ostream& os, const FloatComplexColumnVector& a);
145  friend OCTAVE_API std::istream& operator >> (std::istream& is,
147 
148  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
149  {
151  }
152 
154  { Array<FloatComplex>::clear (n, 1); }
155 
156 };
157 
159 
160 #endif
FloatComplexColumnVector operator*(const FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:158
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCColVector.h:148
FloatComplexRowVector & fill(float val)
Definition: fCRowVector.cc:97
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:567
FloatComplexColumnVector(const FloatComplexColumnVector &a)
Definition: fCColVector.h:54
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
FloatComplexRowVector & operator=(const FloatComplexRowVector &a)
Definition: fCRowVector.h:65
FloatComplexColumnVector(octave_idx_type n, const FloatComplex &val)
Definition: fCColVector.h:51
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
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:229
#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:398
Array< FloatComplex > as_column(void) const
Return the array as a column vector.
Definition: Array.h:367
FloatComplexRowVector extract(octave_idx_type c1, octave_idx_type c2) const
Definition: fCRowVector.cc:214
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:216
FloatComplexColumnVector(const dim_vector &dv)
Definition: fCColVector.h:48
void resize(const dim_vector &dv, const T &rfv)
Definition: Array.cc:1028
FloatComplexColumnVector(octave_idx_type n)
Definition: fCColVector.h:45
FloatComplexColumnVector hermitian(void) const
Definition: fCRowVector.cc:194
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:538
void clear(octave_idx_type n)
Definition: fCColVector.h:153
friend class FloatComplexColumnVector
Definition: fCRowVector.h:37
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:228
void clear(void)
Definition: Array.cc:95
OCTAVE_EXPORT octave_value_list return the value of the option it must match the dimension of the state and the relative tolerance must also be a vector of the same length tem it must match the dimension of the state and the absolute tolerance must also be a vector of the same length The local error test applied at each integration step is xample roup abs(local error in x(i))<
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
FloatComplexColumnVector operator-=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:158
b
Definition: cellfun.cc:398
FloatComplexColumnVector operator+=(FloatComplexColumnVector &x, const FloatComplex &y)
Definition: fCColVector.h:158
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
FloatComplexRowVector & insert(const FloatRowVector &a, octave_idx_type c)
Definition: fCRowVector.cc:58
FloatComplexColumnVector(const MArray< FloatComplex > &a)
Definition: fCColVector.h:57
write the output to stdout if nargout is
Definition: load-save.cc:1576
Vector representing the dimensions (size) of an Array.
Definition: dim-vector.h:87
FloatComplexColumnVector(const Array< FloatComplex > &a)
Definition: fCColVector.h:60
dim_vector dv
Definition: sub2ind.cc:263
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:85
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:205