//=============================================================================
//! Base class for Small Real Double-precision Row Vector Class
class drovector_small_base
{
public:
//////// constructor ////////
drovector_small_base(){;}
virtual ~drovector_small_base(){;}
};
//=============================================================================
//! Samll Real Double-precision Row Vector Class
template<long l> class drovector_small : public drovector_small_base
{
public:
//////// data ////////
double array[l];
//////// constructor ////////
drovector_small(){;}
drovector_small(const double& x){
for(long k=0; k<l; k++){ array[k]=x; }
}
~drovector_small(){;}
//////// function ////////
double& operator()(const long& k){ return array[k]; }
double operator()(const long& k)const{ return array[k]; }
//long get_m(){ return n; }
//long get_n(){ return n; }
void zero(){ for(long k=0; k<l; k++){array[k]=0.;} }
};
//=============================================================================
template<long l>
inline std::ostream& operator<<(std::ostream& s, const drovector_small<l>& A)
{
s << std::setiosflags(std::ios::showpos);
for(long i=0; i<l; i++){
s << " " << A(i) << std::flush;
}
s << std::endl;
return s;
}