Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (octave_ComplexRowVector_h)
00024 #define octave_ComplexRowVector_h 1
00025
00026 #include "MArray.h"
00027 #include "dRowVector.h"
00028
00029 #include "mx-defs.h"
00030
00031 class
00032 OCTAVE_API
00033 ComplexRowVector : public MArray<Complex>
00034 {
00035 friend class ComplexColumnVector;
00036
00037 public:
00038
00039 ComplexRowVector (void) : MArray<Complex> (dim_vector (1, 0)) { }
00040
00041 explicit ComplexRowVector (octave_idx_type n)
00042 : MArray<Complex> (dim_vector (1, n)) { }
00043
00044 explicit ComplexRowVector (const dim_vector& dv) : MArray<Complex> (dv) { }
00045
00046 ComplexRowVector (octave_idx_type n, const Complex& val)
00047 : MArray<Complex> (dim_vector (1, n), val) { }
00048
00049 ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { }
00050
00051 ComplexRowVector (const MArray<Complex>& a)
00052 : MArray<Complex> (a.as_row ()) { }
00053
00054 ComplexRowVector (const Array<Complex>& a)
00055 : MArray<Complex> (a.as_row ()) { }
00056
00057 explicit ComplexRowVector (const RowVector& a) : MArray<Complex> (a) { }
00058
00059 ComplexRowVector& operator = (const ComplexRowVector& a)
00060 {
00061 MArray<Complex>::operator = (a);
00062 return *this;
00063 }
00064
00065 bool operator == (const ComplexRowVector& a) const;
00066 bool operator != (const ComplexRowVector& a) const;
00067
00068
00069
00070 ComplexRowVector& insert (const RowVector& a, octave_idx_type c);
00071 ComplexRowVector& insert (const ComplexRowVector& a, octave_idx_type c);
00072
00073 ComplexRowVector& fill (double val);
00074 ComplexRowVector& fill (const Complex& val);
00075 ComplexRowVector& fill (double val, octave_idx_type c1, octave_idx_type c2);
00076 ComplexRowVector& fill (const Complex& val, octave_idx_type c1, octave_idx_type c2);
00077
00078 ComplexRowVector append (const RowVector& a) const;
00079 ComplexRowVector append (const ComplexRowVector& a) const;
00080
00081 ComplexColumnVector hermitian (void) const;
00082 ComplexColumnVector transpose (void) const;
00083
00084 friend ComplexRowVector conj (const ComplexRowVector& a);
00085
00086
00087
00088 ComplexRowVector extract (octave_idx_type c1, octave_idx_type c2) const;
00089
00090 ComplexRowVector extract_n (octave_idx_type c1, octave_idx_type n) const;
00091
00092
00093
00094 ComplexRowVector& operator += (const RowVector& a);
00095 ComplexRowVector& operator -= (const RowVector& a);
00096
00097
00098
00099 friend ComplexRowVector operator * (const ComplexRowVector& a,
00100 const ComplexMatrix& b);
00101
00102 friend ComplexRowVector operator * (const RowVector& a,
00103 const ComplexMatrix& b);
00104
00105
00106
00107 Complex min (void) const;
00108 Complex max (void) const;
00109
00110
00111
00112 friend std::ostream& operator << (std::ostream& os, const ComplexRowVector& a);
00113 friend std::istream& operator >> (std::istream& is, ComplexRowVector& a);
00114
00115 void resize (octave_idx_type n,
00116 const Complex& rfv = Array<Complex>::resize_fill_value ())
00117 {
00118 Array<Complex>::resize (dim_vector (1, n), rfv);
00119 }
00120
00121 void clear (octave_idx_type n)
00122 { Array<Complex>::clear (1, n); }
00123
00124 };
00125
00126
00127
00128 Complex OCTAVE_API operator * (const ComplexRowVector& a, const ColumnVector& b);
00129
00130 Complex OCTAVE_API operator * (const ComplexRowVector& a, const ComplexColumnVector& b);
00131
00132
00133
00134 OCTAVE_API ComplexRowVector linspace (const Complex& x1, const Complex& x2, octave_idx_type n);
00135
00136 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex)
00137
00138 #endif