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
fCRowVector.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2017 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 "octave-config.h"
27 
28 #include "MArray.h"
29 #include "fRowVector.h"
30 
31 #include "mx-defs.h"
32 
33 class
34 OCTAVE_API
36 {
38 
39 public:
40 
42  : MArray<FloatComplex> (dim_vector (1, 0)) { }
43 
45  : MArray<FloatComplex> (dim_vector (1, n)) { }
46 
48  : MArray<FloatComplex> (dv.as_row ()) { }
49 
51  : MArray<FloatComplex> (dim_vector (1, n), val) { }
52 
54  : MArray<FloatComplex> (a) { }
55 
57  : MArray<FloatComplex> (a.as_row ()) { }
58 
60  : MArray<FloatComplex> (a.as_row ()) { }
61 
63  : MArray<FloatComplex> (a) { }
64 
66  {
68  return *this;
69  }
70 
71  bool operator == (const FloatComplexRowVector& a) const;
72  bool operator != (const FloatComplexRowVector& a) const;
73 
74  // destructive insert/delete/reorder operations
75 
79 
86 
89 
92 
94 
95  // resize is the destructive equivalent for this one
96 
98 
100 
101  // row vector by row vector -> row vector operations
102 
105 
106  // row vector by matrix -> row vector
107 
109  const FloatComplexMatrix& b);
110 
112  const FloatComplexMatrix& b);
113 
114  // other operations
115 
116  FloatComplex min (void) const;
117  FloatComplex max (void) const;
118 
119  // i/o
120 
121  friend std::ostream& operator << (std::ostream& os,
122  const FloatComplexRowVector& a);
123  friend std::istream& operator >> (std::istream& is,
125 
126  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
127  {
129  }
130 
132  { Array<FloatComplex>::clear (1, n); }
133 
134 };
135 
136 // row vector by column vector -> scalar
137 
139  const ColumnVector& b);
140 
142  const FloatComplexColumnVector& b);
143 
144 // other operations
145 
146 OCTAVE_API FloatComplexRowVector linspace (const FloatComplex& x1,
147  const FloatComplex& x2, octave_idx_type n);
148 
150 
151 #endif
FloatComplexRowVector(octave_idx_type n)
Definition: fCRowVector.h:44
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:567
std::istream & operator>>(std::istream &is, SparseBoolMatrix &a)
Definition: boolSparse.cc:279
identity matrix If supplied two scalar respectively For allows like xample val
Definition: data.cc:5068
FloatComplexColumnVector & operator=(const FloatComplexColumnVector &a)
Definition: fCColVector.h:65
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:62
FloatComplexRowVector operator+=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:149
Array< FloatComplex > as_row(void) const
Return the array as a row vector.
Definition: Array.h:377
#define MARRAY_FORWARD_DEFS(B, R, T)
Definition: MArray.h:126
FloatComplexRowVector(const dim_vector &dv)
Definition: fCRowVector.h:47
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
FloatComplexRowVector(const MArray< FloatComplex > &a)
Definition: fCRowVector.h:56
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:216
void resize(const dim_vector &dv, const T &rfv)
Definition: Array.cc:1028
void clear(octave_idx_type n)
Definition: fCRowVector.h:131
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCRowVector.h:126
bool append
Definition: load-save.cc:1582
the sparsity preserving column transformation such that that defines the pivoting threshold can be given in which case it defines the c
Definition: lu.cc:138
FloatComplex OCTAVE_API operator*(const FloatComplexRowVector &a, const ColumnVector &b)
FloatComplexRowVector hermitian(void) const
Definition: fCColVector.cc:200
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:538
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:228
void clear(void)
Definition: Array.cc:95
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:241
b
Definition: cellfun.cc:398
FloatComplexRowVector(octave_idx_type n, const FloatComplex &val)
Definition: fCRowVector.h:50
FloatComplexColumnVector & fill(float val)
Definition: fCColVector.cc:102
FloatComplexColumnVector & insert(const FloatColumnVector &a, octave_idx_type r)
Definition: fCColVector.cc:63
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
FloatComplexRowVector(const FloatComplexRowVector &a)
Definition: fCRowVector.h:53
FloatComplexColumnVector extract(octave_idx_type r1, octave_idx_type r2) const
Definition: fCColVector.cc:226
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
dim_vector dv
Definition: sub2ind.cc:263
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:85
OCTAVE_API FloatComplexRowVector linspace(const FloatComplex &x1, const FloatComplex &x2, octave_idx_type n)
Definition: fCRowVector.cc:427
FloatComplexRowVector operator-=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:149
FloatComplexRowVector(const Array< FloatComplex > &a)
Definition: fCRowVector.h:59
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:205