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_ColumnVector_h)
00025 #define octave_ColumnVector_h 1
00026
00027 #include "MArray.h"
00028
00029 #include "mx-defs.h"
00030
00031 class
00032 OCTAVE_API
00033 ColumnVector : public MArray<double>
00034 {
00035 public:
00036
00037 ColumnVector (void) : MArray<double> () { }
00038
00039 explicit ColumnVector (octave_idx_type n) : MArray<double> (n) { }
00040
00041 explicit ColumnVector (const dim_vector& dv) : MArray<double> (dv) { }
00042
00043 ColumnVector (octave_idx_type n, double val) : MArray<double> (n, val) { }
00044
00045 ColumnVector (const ColumnVector& a) : MArray<double> (a) { }
00046
00047 ColumnVector (const MArray<double>& a) : MArray<double> (a) { }
00048
00049 ColumnVector& operator = (const ColumnVector& a)
00050 {
00051 MArray<double>::operator = (a);
00052 return *this;
00053 }
00054
00055 bool operator == (const ColumnVector& a) const;
00056 bool operator != (const ColumnVector& a) const;
00057
00058
00059
00060 ColumnVector& insert (const ColumnVector& a, octave_idx_type r);
00061
00062 ColumnVector& fill (double val);
00063 ColumnVector& fill (double val, octave_idx_type r1, octave_idx_type r2);
00064
00065 ColumnVector stack (const ColumnVector& a) const;
00066
00067 RowVector transpose (void) const;
00068
00069 friend OCTAVE_API ColumnVector real (const ComplexColumnVector& a);
00070 friend OCTAVE_API ColumnVector imag (const ComplexColumnVector& a);
00071
00072
00073
00074 ColumnVector extract (octave_idx_type r1, octave_idx_type r2) const;
00075
00076 ColumnVector extract_n (octave_idx_type r1, octave_idx_type n) const;
00077
00078
00079
00080 friend OCTAVE_API ColumnVector operator * (const Matrix& a, const ColumnVector& b);
00081
00082
00083
00084 friend OCTAVE_API ColumnVector operator * (const DiagMatrix& a, const ColumnVector& b);
00085
00086
00087
00088 typedef double (*dmapper) (double);
00089 typedef Complex (*cmapper) (const Complex&);
00090
00091 ColumnVector map (dmapper fcn) const;
00092 ComplexColumnVector map (cmapper fcn) const;
00093
00094 double min (void) const;
00095 double max (void) const;
00096
00097
00098
00099 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const ColumnVector& a);
00100 friend OCTAVE_API std::istream& operator >> (std::istream& is, ColumnVector& a);
00101
00102 private:
00103
00104 ColumnVector (double *d, octave_idx_type l) : MArray<double> (d, l) { }
00105 };
00106
00107
00108
00109 extern OCTAVE_API ColumnVector real (const ComplexColumnVector& a);
00110 extern OCTAVE_API ColumnVector imag (const ComplexColumnVector& a);
00111
00112 MARRAY_FORWARD_DEFS (MArray, ColumnVector, double)
00113
00114 #endif
00115
00116
00117
00118
00119
00120