larvd.h

Go to the documentation of this file.
00001 // -*-C++-*- 
00002 
00003 // Copyright (C) 2004 
00004 // Christian Stimming <stimming@tuhh.de>
00005 
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public License as
00008 // published by the Free Software Foundation; either version 2, or (at
00009 // your option) any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU Lesser General Public License for more details.
00015 
00016 // You should have received a copy of the GNU Lesser General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 // USA.
00020 
00021 //      LAPACK++ (V. 1.1)
00022 //      (C) 1992-1996 All Rights Reserved.
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);   //make sure rhs is a
00122                                                 // a vector.
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     // _LA_ROW_VECTOR_DOUBLE_H_

Generated on Sat Jul 14 11:40:36 2007 for Lapack++ by  doxygen 1.5.0