00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028 #ifndef _LA_ROW_VECTOR_DOUBLE_H_
00029 #define _LA_ROW_VECTOR_DOUBLE_H_
00030
00031 #include "lafnames.h"
00032
00033 #ifndef _LA_GEN_MAT_DOUBLE_H_
00034 #include LA_GEN_MAT_DOUBLE_H
00035 #endif
00036
00037
00046 class LaRowVectorDouble: public LaGenMatDouble
00047 {
00048 public:
00049
00050 inline LaRowVectorDouble();
00051 inline LaRowVectorDouble(int);
00052 inline LaRowVectorDouble(double*, int);
00053 inline LaRowVectorDouble(const LaGenMatDouble&);
00054
00055 inline int size() const;
00056 inline int inc() const;
00057 inline LaIndex index() const;
00058 inline int start() const;
00059 inline int end() const;
00060
00061
00062 inline double& operator()(int i);
00063 inline const double& operator()(int i) const ;
00064 inline LaRowVectorDouble operator()(const LaIndex&);
00065
00066 inline LaRowVectorDouble& operator=(const LaGenMatDouble &A);
00067 inline LaRowVectorDouble& operator=(double d);
00068
00069 };
00070
00071
00072 inline LaRowVectorDouble::LaRowVectorDouble() : LaGenMatDouble(1,0) {}
00073 inline LaRowVectorDouble::LaRowVectorDouble(int i) : LaGenMatDouble(1, i) {}
00074
00075
00076 inline LaRowVectorDouble::LaRowVectorDouble(double *d, int m) :
00077 LaGenMatDouble(d,1,m) {}
00078
00079
00080 inline LaRowVectorDouble::LaRowVectorDouble(const LaGenMatDouble& G) :
00081 LaGenMatDouble(G)
00082 {
00083 assert(G.size(0)==1);
00084
00085 }
00086
00087
00088 inline int LaRowVectorDouble::size() const
00089 { return LaGenMatDouble::size(0)*LaGenMatDouble::size(1); }
00090
00091 inline double& LaRowVectorDouble::operator()(int i)
00092 {
00093 return LaGenMatDouble::operator()(0,i);
00094 }
00095
00096 inline const double& LaRowVectorDouble::operator()(int i) const
00097 {
00098 return LaGenMatDouble::operator()(0,i);
00099 }
00100
00101 inline LaRowVectorDouble LaRowVectorDouble::operator()(const LaIndex& I)
00102 {
00103 return LaGenMatDouble::operator()(LaIndex(0,0),I);
00104 }
00105
00106 inline LaRowVectorDouble& LaRowVectorDouble::operator=(const LaGenMatDouble &A)
00107 {
00108 LaGenMatDouble::copy(A);
00109 return *this;
00110 }
00111
00112 inline LaRowVectorDouble& LaRowVectorDouble::operator=(double d)
00113 {
00114 LaGenMatDouble::operator=(d);
00115 return *this;
00116 }
00117
00118 #if 0
00119 inline LaRowVectorDouble& LaRowVectorDouble::copy(const LaGenMatDouble &A)
00120 {
00121 assert(A.size(0) == 1 || A.size(1) == 1);
00122
00123 LaGenMatDouble::copy(A);
00124 return *this;
00125 }
00126
00127
00128 inline LaRowVectorDouble& LaRowVectorDouble::ref(const LaGenMatDouble &A)
00129 {
00130 assert(A.size(0) == 1 || A.size(1) == 1);
00131 LaGenMatDouble::ref(A);
00132 return *this;
00133 }
00134
00135
00136 inline LaRowVectorDouble& LaRowVectorDouble::inject(const LaGenMatDouble &A)
00137 {
00138 assert(A.size(0) == 1 || A.size(1) == 1);
00139 LaGenMatDouble::inject(A);
00140 return *this;
00141 }
00142
00143 #endif
00144
00145 inline int LaRowVectorDouble::inc() const
00146 {
00147 return LaGenMatDouble::inc(1);
00148 }
00149
00150 inline LaIndex LaRowVectorDouble::index() const
00151 {
00152 return LaGenMatDouble::index(1);
00153 }
00154
00155 inline int LaRowVectorDouble::start() const
00156 {
00157 return LaGenMatDouble::start(1);
00158 }
00159
00160 inline int LaRowVectorDouble::end() const
00161 {
00162 return LaGenMatDouble::end(1);
00163 }
00164
00165 #endif
00166