GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
fCRowVector.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1994-2018 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
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License 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 <https://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 #include "mx-defs.h"
31 
32 class
33 OCTAVE_API
35 {
37 
38 public:
39 
41  : MArray<FloatComplex> (dim_vector (1, 0)) { }
42 
44  : MArray<FloatComplex> (dim_vector (1, n)) { }
45 
47  : MArray<FloatComplex> (dv.as_row ()) { }
48 
50  : MArray<FloatComplex> (dim_vector (1, n), val) { }
51 
53  : MArray<FloatComplex> (a) { }
54 
56  : MArray<FloatComplex> (a.as_row ()) { }
57 
59  : MArray<FloatComplex> (a.as_row ()) { }
60 
62  : MArray<FloatComplex> (a) { }
63 
65  {
67  return *this;
68  }
69 
70  bool operator == (const FloatComplexRowVector& a) const;
71  bool operator != (const FloatComplexRowVector& a) const;
72 
73  // destructive insert/delete/reorder operations
74 
78 
85 
88 
91 
93 
94  // resize is the destructive equivalent for this one
95 
97 
99 
100  // row vector by row vector -> row vector operations
101 
104 
105  // row vector by matrix -> row vector
106 
108  const FloatComplexMatrix& b);
109 
111  const FloatComplexMatrix& b);
112 
113  // other operations
114 
115  FloatComplex min (void) const;
116  FloatComplex max (void) const;
117 
118  // i/o
119 
120  friend std::ostream& operator << (std::ostream& os,
121  const FloatComplexRowVector& a);
122  friend std::istream& operator >> (std::istream& is,
124 
125  void resize (octave_idx_type n, const FloatComplex& rfv = FloatComplex (0))
126  {
128  }
129 
131  { Array<FloatComplex>::clear (1, n); }
132 
133 };
134 
135 // row vector by column vector -> scalar
136 
138  const ColumnVector& b);
139 
141  const FloatComplexColumnVector& b);
142 
143 // other operations
144 
145 OCTAVE_API FloatComplexRowVector linspace (const FloatComplex& x1,
146  const FloatComplex& x2, octave_idx_type n);
147 
149 
150 #endif
FloatComplexRowVector(octave_idx_type n)
Definition: fCRowVector.h:43
bool operator!=(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:566
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:4986
FloatComplexColumnVector & operator=(const FloatComplexColumnVector &a)
Definition: fCColVector.h:64
FloatComplexColumnVector extract(octave_idx_type r1, octave_idx_type r2) const
Definition: fCColVector.cc:225
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
FloatComplexRowVector(const FloatRowVector &a)
Definition: fCRowVector.h:61
FloatComplexRowVector operator+=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:148
nd example oindent opens the file binary numeric values will be read assuming they are stored in IEEE format with the least significant bit and then converted to the native representation Opening a file that is already open simply opens it again and returns a separate file id It is not an error to open a file several though writing to the same file through several different file ids may produce unexpected results The possible values of text mode reading and writing automatically converts linefeeds to the appropriate line end character for the you may append a you must also open the file in binary mode The parameter conversions are currently only supported for and permissions will be set to and then everything is written in a single operation This is very efficient and improves performance c
Definition: file-io.cc:587
#define MARRAY_FORWARD_DEFS(B, R, T)
Definition: MArray.h:126
FloatComplexRowVector(const dim_vector &dv)
Definition: fCRowVector.h:46
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
FloatComplexRowVector(const MArray< FloatComplex > &a)
Definition: fCRowVector.h:55
ComplexColumnVector conj(const ComplexColumnVector &a)
Definition: CColVector.cc:215
FloatComplexColumnVector extract_n(octave_idx_type r1, octave_idx_type n) const
Definition: fCColVector.cc:240
void resize(const dim_vector &dv, const T &rfv)
Resizing (with fill).
Definition: Array.cc:1010
void clear(octave_idx_type n)
Definition: fCRowVector.h:130
void resize(octave_idx_type n, const FloatComplex &rfv=FloatComplex(0))
Definition: fCRowVector.h:125
bool append
Definition: load-save.cc:1618
FloatComplex OCTAVE_API operator*(const FloatComplexRowVector &a, const ColumnVector &b)
bool operator==(const dim_vector &a, const dim_vector &b)
Definition: dim-vector.h:550
MArray< T > & operator=(const MArray< T > &a)
Definition: MArray.h:85
Array< FloatComplex > as_row(void) const
Return the array as a row vector.
Definition: Array.h:380
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:227
void clear(void)
Definition: Array.cc:86
FloatComplexRowVector hermitian(void) const
Definition: fCColVector.cc:199
template OCTAVE_API std::ostream & operator<<(std::ostream &, const Array< bool > &)
b
Definition: cellfun.cc:400
FloatComplexRowVector(octave_idx_type n, const FloatComplex &val)
Definition: fCRowVector.h:49
FloatComplexColumnVector & fill(float val)
Definition: fCColVector.cc:101
FloatComplexColumnVector & insert(const FloatColumnVector &a, octave_idx_type r)
Definition: fCColVector.cc:62
std::complex< float > FloatComplex
Definition: oct-cmplx.h:32
FloatComplexRowVector(const FloatComplexRowVector &a)
Definition: fCRowVector.h:52
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
dim_vector dv
Definition: sub2ind.cc:263
octave::stream os
Definition: file-io.cc:627
OCTAVE_API FloatComplexRowVector linspace(const FloatComplex &x1, const FloatComplex &x2, octave_idx_type n)
Definition: fCRowVector.cc:426
FloatComplexRowVector operator-=(FloatComplexRowVector &x, const FloatComplex &y)
Definition: fCRowVector.h:148
FloatComplexRowVector(const Array< FloatComplex > &a)
Definition: fCRowVector.h:58
charNDArray min(char d, const charNDArray &m)
Definition: chNDArray.cc:204