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_FloatRowVector_h)
00024 #define octave_FloatRowVector_h 1
00025
00026 #include "MArray.h"
00027
00028 #include "mx-defs.h"
00029
00030 class
00031 OCTAVE_API
00032 FloatRowVector : public MArray<float>
00033 {
00034 public:
00035
00036 FloatRowVector (void) : MArray<float> (dim_vector (1, 0)) { }
00037
00038 explicit FloatRowVector (octave_idx_type n)
00039 : MArray<float> (dim_vector (1, n)) { }
00040
00041 explicit FloatRowVector (const dim_vector& dv)
00042 : MArray<float> (dv.as_row ()) { }
00043
00044 FloatRowVector (octave_idx_type n, float val)
00045 : MArray<float> (dim_vector (1, n), val) { }
00046
00047 FloatRowVector (const FloatRowVector& a) : MArray<float> (a) { }
00048
00049 FloatRowVector (const MArray<float>& a) : MArray<float> (a.as_row ()) { }
00050
00051 FloatRowVector (const Array<float>& a) : MArray<float> (a.as_row ()) { }
00052
00053 FloatRowVector& operator = (const FloatRowVector& a)
00054 {
00055 MArray<float>::operator = (a);
00056 return *this;
00057 }
00058
00059 bool operator == (const FloatRowVector& a) const;
00060 bool operator != (const FloatRowVector& a) const;
00061
00062
00063
00064 FloatRowVector& insert (const FloatRowVector& a, octave_idx_type c);
00065
00066 FloatRowVector& fill (float val);
00067 FloatRowVector& fill (float val, octave_idx_type c1, octave_idx_type c2);
00068
00069 FloatRowVector append (const FloatRowVector& a) const;
00070
00071 FloatColumnVector transpose (void) const;
00072
00073 friend OCTAVE_API FloatRowVector real (const FloatComplexRowVector& a);
00074 friend OCTAVE_API FloatRowVector imag (const FloatComplexRowVector& a);
00075
00076
00077
00078 FloatRowVector extract (octave_idx_type c1, octave_idx_type c2) const;
00079
00080 FloatRowVector extract_n (octave_idx_type c1, octave_idx_type n) const;
00081
00082
00083
00084 friend OCTAVE_API FloatRowVector operator * (const FloatRowVector& a, const FloatMatrix& b);
00085
00086
00087
00088 float min (void) const;
00089 float max (void) const;
00090
00091
00092
00093 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const FloatRowVector& a);
00094 friend OCTAVE_API std::istream& operator >> (std::istream& is, FloatRowVector& a);
00095
00096 void resize (octave_idx_type n,
00097 const float& rfv = Array<float>::resize_fill_value ())
00098 {
00099 Array<float>::resize (dim_vector (1, n), rfv);
00100 }
00101
00102 void clear (octave_idx_type n)
00103 { Array<float>::clear (1, n); }
00104
00105 };
00106
00107
00108
00109 float OCTAVE_API operator * (const FloatRowVector& a, const FloatColumnVector& b);
00110
00111 Complex OCTAVE_API operator * (const FloatRowVector& a, const ComplexColumnVector& b);
00112
00113
00114
00115 OCTAVE_API FloatRowVector linspace (float x1, float x2, octave_idx_type n);
00116
00117 MARRAY_FORWARD_DEFS (MArray, FloatRowVector, float)
00118
00119 #endif