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
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 {
00090 return LaGenMatDouble::size(0) * LaGenMatDouble::size(1);
00091 }
00092
00093 inline double& LaRowVectorDouble::operator()(int i)
00094 {
00095 return LaGenMatDouble::operator()(0, i);
00096 }
00097
00098 inline const double& LaRowVectorDouble::operator()(int i) const
00099 {
00100 return LaGenMatDouble::operator()(0, i);
00101 }
00102
00103 inline LaRowVectorDouble LaRowVectorDouble::operator()(const LaIndex& I)
00104 {
00105 return LaGenMatDouble::operator()(LaIndex(0, 0), I);
00106 }
00107
00108 inline LaRowVectorDouble& LaRowVectorDouble::operator=(const LaGenMatDouble &A)
00109 {
00110 LaGenMatDouble::copy(A);
00111 return *this;
00112 }
00113
00114 inline LaRowVectorDouble& LaRowVectorDouble::operator=(double d)
00115 {
00116 LaGenMatDouble::operator=(d);
00117 return *this;
00118 }
00119
00120 #if 0
00121 inline LaRowVectorDouble& LaRowVectorDouble::copy(const LaGenMatDouble &A)
00122 {
00123 assert(A.size(0) == 1 || A.size(1) == 1);
00124
00125 LaGenMatDouble::copy(A);
00126 return *this;
00127 }
00128
00129
00130 inline LaRowVectorDouble& LaRowVectorDouble::ref(const LaGenMatDouble &A)
00131 {
00132 assert(A.size(0) == 1 || A.size(1) == 1);
00133 LaGenMatDouble::ref(A);
00134 return *this;
00135 }
00136
00137
00138 inline LaRowVectorDouble& LaRowVectorDouble::inject(const LaGenMatDouble &A)
00139 {
00140 assert(A.size(0) == 1 || A.size(1) == 1);
00141 LaGenMatDouble::inject(A);
00142 return *this;
00143 }
00144
00145 #endif
00146
00147 inline int LaRowVectorDouble::inc() const
00148 {
00149 return LaGenMatDouble::inc(1);
00150 }
00151
00152 inline LaIndex LaRowVectorDouble::index() const
00153 {
00154 return LaGenMatDouble::index(1);
00155 }
00156
00157 inline int LaRowVectorDouble::start() const
00158 {
00159 return LaGenMatDouble::start(1);
00160 }
00161
00162 inline int LaRowVectorDouble::end() const
00163 {
00164 return LaGenMatDouble::end(1);
00165 }
00166
00167 #endif
00168