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 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
00027 #pragma interface
00028 #endif
00029
00030 #include "MArray.h"
00031
00032 #include "mx-defs.h"
00033
00034 class
00035 ComplexRowVector : public MArray<Complex>
00036 {
00037 friend class ComplexColumnVector;
00038
00039 public:
00040
00041 ComplexRowVector (void) : MArray<Complex> () { }
00042
00043 explicit ComplexRowVector (int n) : MArray<Complex> (n) { }
00044
00045 ComplexRowVector (int 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, int c);
00065 ComplexRowVector& insert (const ComplexRowVector& a, int c);
00066
00067 ComplexRowVector& fill (double val);
00068 ComplexRowVector& fill (const Complex& val);
00069 ComplexRowVector& fill (double val, int c1, int c2);
00070 ComplexRowVector& fill (const Complex& val, int c1, int 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 (int c1, int c2) const;
00083
00084 ComplexRowVector extract_n (int c1, int 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 ComplexRowVector map (c_c_Mapper f) const;
00102 RowVector map (d_c_Mapper f) const;
00103
00104 ComplexRowVector& apply (c_c_Mapper f);
00105
00106 Complex min (void) const;
00107 Complex max (void) const;
00108
00109
00110
00111 friend std::ostream& operator << (std::ostream& os, const ComplexRowVector& a);
00112 friend std::istream& operator >> (std::istream& is, ComplexRowVector& a);
00113
00114 private:
00115
00116 ComplexRowVector (Complex *d, int l) : MArray<Complex> (d, l) { }
00117 };
00118
00119
00120
00121 Complex operator * (const ComplexRowVector& a, const ColumnVector& b);
00122
00123 Complex operator * (const ComplexRowVector& a, const ComplexColumnVector& b);
00124
00125
00126
00127 ComplexRowVector linspace (const Complex& x1, const Complex& x2, int n);
00128
00129 MARRAY_FORWARD_DEFS (MArray, ComplexRowVector, Complex)
00130
00131 #endif
00132
00133
00134
00135
00136
00137