00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (octave_ComplexRowVector_h)
00025 #define octave_ComplexRowVector_h 1
00026
00027 #include "MArray.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> () { }
00040
00041 explicit ComplexRowVector (octave_idx_type n) : MArray<Complex> (n) { }
00042
00043 explicit ComplexRowVector (const dim_vector& dv) : MArray<Complex> (dv) { }
00044
00045 ComplexRowVector (octave_idx_type n, const Complex& val) : MArray<Complex> (n, val) { }
00046
00047 ComplexRowVector (const ComplexRowVector& a) : MArray<Complex> (a) { }
00048
00049 ComplexRowVector (const MArray<Complex>& a) : MArray<Complex> (a) { }
00050
00051 explicit ComplexRowVector (const RowVector& a);
00052
00053 ComplexRowVector& operator = (const ComplexRowVector& a)
00054 {
00055 MArray<Complex>::operator = (a);
00056 return *this;
00057 }
00058
00059 bool operator == (const ComplexRowVector& a) const;
00060 bool operator != (const ComplexRowVector& a) const;
00061
00062
00063
00064 ComplexRowVector& insert (const RowVector& a, octave_idx_type c);
00065 ComplexRowVector& insert (const ComplexRowVector& a, octave_idx_type c);
00066
00067 ComplexRowVector& fill (double val);
00068 ComplexRowVector& fill (const Complex& val);
00069 ComplexRowVector& fill (double val, octave_idx_type c1, octave_idx_type c2);
00070 ComplexRowVector& fill (const Complex& val, octave_idx_type c1, octave_idx_type c2);
00071
00072 ComplexRowVector append (const RowVector& a) const;
00073 ComplexRowVector append (const ComplexRowVector& a) const;
00074
00075 ComplexColumnVector hermitian (void) const;
00076 ComplexColumnVector transpose (void) const;
00077
00078 friend ComplexRowVector conj (const ComplexRowVector& a);
00079
00080
00081
00082 ComplexRowVector extract (octave_idx_type c1, octave_idx_type c2) const;
00083
00084 ComplexRowVector extract_n (octave_idx_type c1, octave_idx_type n) const;
00085
00086
00087
00088 ComplexRowVector& operator += (const RowVector& a);
00089 ComplexRowVector& operator -= (const RowVector& a);
00090
00091
00092
00093 friend ComplexRowVector operator * (const ComplexRowVector& a,
00094 const ComplexMatrix& b);
00095
00096 friend ComplexRowVector operator * (const RowVector& a,
00097 const ComplexMatrix& b);
00098
00099
00100
00101 typedef double (*dmapper) (const Complex&);
00102 typedef Complex (*cmapper) (const Complex&);
00103
00104 RowVector map (dmapper fcn) const;
00105 ComplexRowVector map (cmapper fcn) const;
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 private:
00116
00117 ComplexRowVector (Complex *d, octave_idx_type l) : MArray<Complex> (d, l) { }
00118 };
00119
00120
00121
00122 Complex operator * (const ComplexRowVector& a, const ColumnVector& b);
00123
00124 Complex operator * (const ComplexRowVector& a, const ComplexColumnVector& b);
00125
00126
00127
00128 OCTAVE_API ComplexRowVector linspace (const Complex& x1, const Complex& x2, octave_idx_type n);
00129
00130 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex)
00131
00132 #endif
00133
00134
00135
00136
00137
00138