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
fCRowVector.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2015 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
FloatComplexRowVector(octave_idx_type n)
Definition: fCRowVector.h:42
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:548
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
FloatComplexColumnVector & operator=(const FloatComplexColumnVector &a)
Definition: fCColVector.h:63
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(const FloatRowVector &a)
Definition: fCRowVector.h:60
FloatComplexRowVector operator+=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:147
Array< FloatComplex > as_row(void) const
Return the array as a row vector.
Definition: Array.h:289
FloatComplexRowVector(const dim_vector &dv)
Definition: fCRowVector.h:45
FloatComplexRowVector(const MArray< FloatComplex > &a)
Definition: fCRowVector.h:54
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:244
void resize(const dim_vector &dv, const T &rfv)
Definition: Array.cc:1033
void clear(octave_idx_type n)
Definition: fCRowVector.h:129
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCRowVector.h:124
#define MARRAY_FORWARD_DEFS(B, R, T)
Definition: MArray-decl.h:236
FloatComplex OCTAVE_API operator*(const FloatComplexRowVector &a, const ColumnVector &b)
FloatComplexRowVector hermitian(void) const
Definition: fCColVector.cc:228
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:519
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 extract_n(octave_idx_type r1, octave_idx_type n) const
Definition: fCColVector.cc:269
FloatComplexRowVector(octave_idx_type n, const FloatComplex &val)
Definition: fCRowVector.h:48
FloatComplexColumnVector & fill(float val)
Definition: fCColVector.cc:123
FloatComplexColumnVector & insert(const FloatColumnVector &a, octave_idx_type r)
Definition: fCColVector.cc:78
std::complex< float > FloatComplex
Definition: oct-cmplx.h:30
FloatComplexRowVector(const FloatComplexRowVector &a)
Definition: fCRowVector.h:51
static MArray< double > const octave_idx_type const octave_idx_type octave_idx_type octave_idx_type octave_idx_type c1
FloatComplexColumnVector extract(octave_idx_type r1, octave_idx_type r2) const
Definition: fCColVector.cc:254
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:65
OCTAVE_API FloatComplexRowVector linspace(const FloatComplex &x1, const FloatComplex &x2, octave_idx_type n)
Definition: fCRowVector.cc:464
FloatComplexRowVector operator-=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:147
FloatComplexRowVector(const Array< FloatComplex > &a)
Definition: fCRowVector.h:57
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:210