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_FloatComplexDiagMatrix_h)
00024 #define octave_FloatComplexDiagMatrix_h 1
00025
00026 #include "MDiagArray2.h"
00027
00028 #include "fRowVector.h"
00029 #include "fCRowVector.h"
00030 #include "fColVector.h"
00031 #include "fCColVector.h"
00032 #include "DET.h"
00033
00034 #include "mx-defs.h"
00035
00036 class
00037 OCTAVE_API
00038 FloatComplexDiagMatrix : public MDiagArray2<FloatComplex>
00039 {
00040 public:
00041
00042 FloatComplexDiagMatrix (void) : MDiagArray2<FloatComplex> () { }
00043
00044 FloatComplexDiagMatrix (octave_idx_type r, octave_idx_type c) : MDiagArray2<FloatComplex> (r, c) { }
00045
00046 FloatComplexDiagMatrix (octave_idx_type r, octave_idx_type c, const FloatComplex& val)
00047 : MDiagArray2<FloatComplex> (r, c, val) { }
00048
00049 explicit FloatComplexDiagMatrix (const Array<FloatComplex>& a)
00050 : MDiagArray2<FloatComplex> (a) { }
00051
00052 FloatComplexDiagMatrix (const Array<FloatComplex>& a, octave_idx_type r, octave_idx_type c)
00053 : MDiagArray2<FloatComplex> (a, r, c) { }
00054
00055 explicit FloatComplexDiagMatrix (const Array<float>& a)
00056 : MDiagArray2<FloatComplex> (Array<FloatComplex> (a)) { }
00057
00058 explicit FloatComplexDiagMatrix (const FloatDiagMatrix& a);
00059
00060 FloatComplexDiagMatrix (const MDiagArray2<FloatComplex>& a)
00061 : MDiagArray2<FloatComplex> (a) { }
00062
00063 FloatComplexDiagMatrix (const FloatComplexDiagMatrix& a)
00064 : MDiagArray2<FloatComplex> (a) { }
00065
00066 template <class U>
00067 FloatComplexDiagMatrix (const DiagArray2<U>& a)
00068 : MDiagArray2<FloatComplex> (a) { }
00069
00070 FloatComplexDiagMatrix& operator = (const FloatComplexDiagMatrix& a)
00071 {
00072 MDiagArray2<FloatComplex>::operator = (a);
00073 return *this;
00074 }
00075
00076 bool operator == (const FloatComplexDiagMatrix& a) const;
00077 bool operator != (const FloatComplexDiagMatrix& a) const;
00078
00079 FloatComplexDiagMatrix& fill (float val);
00080 FloatComplexDiagMatrix& fill (const FloatComplex& val);
00081 FloatComplexDiagMatrix& fill (float val, octave_idx_type beg, octave_idx_type end);
00082 FloatComplexDiagMatrix& fill (const FloatComplex& val, octave_idx_type beg, octave_idx_type end);
00083 FloatComplexDiagMatrix& fill (const FloatColumnVector& a);
00084 FloatComplexDiagMatrix& fill (const FloatComplexColumnVector& a);
00085 FloatComplexDiagMatrix& fill (const FloatRowVector& a);
00086 FloatComplexDiagMatrix& fill (const FloatComplexRowVector& a);
00087 FloatComplexDiagMatrix& fill (const FloatColumnVector& a, octave_idx_type beg);
00088 FloatComplexDiagMatrix& fill (const FloatComplexColumnVector& a, octave_idx_type beg);
00089 FloatComplexDiagMatrix& fill (const FloatRowVector& a, octave_idx_type beg);
00090 FloatComplexDiagMatrix& fill (const FloatComplexRowVector& a, octave_idx_type beg);
00091
00092 FloatComplexDiagMatrix hermitian (void) const { return MDiagArray2<FloatComplex>::hermitian (std::conj); }
00093 FloatComplexDiagMatrix transpose (void) const { return MDiagArray2<FloatComplex>::transpose(); }
00094 FloatDiagMatrix abs (void) const;
00095
00096 friend OCTAVE_API FloatComplexDiagMatrix conj (const FloatComplexDiagMatrix& a);
00097
00098
00099
00100 FloatComplexMatrix extract (octave_idx_type r1, octave_idx_type c1, octave_idx_type r2, octave_idx_type c2) const;
00101
00102
00103
00104 FloatComplexRowVector row (octave_idx_type i) const;
00105 FloatComplexRowVector row (char *s) const;
00106
00107 FloatComplexColumnVector column (octave_idx_type i) const;
00108 FloatComplexColumnVector column (char *s) const;
00109
00110 FloatComplexDiagMatrix inverse (octave_idx_type& info) const;
00111 FloatComplexDiagMatrix inverse (void) const;
00112 FloatComplexDiagMatrix pseudo_inverse (void) const;
00113
00114 bool all_elements_are_real (void) const;
00115
00116
00117
00118 FloatComplexDiagMatrix& operator += (const FloatDiagMatrix& a);
00119 FloatComplexDiagMatrix& operator -= (const FloatDiagMatrix& a);
00120
00121
00122
00123 FloatComplexColumnVector diag (octave_idx_type k = 0) const
00124 { return MDiagArray2<FloatComplex>::diag (k); }
00125
00126 FloatComplexDET determinant (void) const;
00127 float rcond (void) const;
00128
00129
00130
00131 friend std::ostream& operator << (std::ostream& os, const FloatComplexDiagMatrix& a);
00132
00133 };
00134
00135 OCTAVE_API FloatComplexDiagMatrix conj (const FloatComplexDiagMatrix& a);
00136
00137
00138
00139 OCTAVE_API FloatComplexDiagMatrix
00140 operator * (const FloatComplexDiagMatrix& a, const FloatComplexDiagMatrix& b);
00141
00142 OCTAVE_API FloatComplexDiagMatrix
00143 operator * (const FloatComplexDiagMatrix& a, const FloatDiagMatrix& b);
00144
00145 OCTAVE_API FloatComplexDiagMatrix
00146 operator * (const FloatDiagMatrix& a, const FloatComplexDiagMatrix& b);
00147
00148 MDIAGARRAY2_FORWARD_DEFS (MDiagArray2, FloatComplexDiagMatrix, FloatComplex)
00149
00150 #endif