Menu

[r88]: / trunk / include / small / drovector_small.hpp  Maximize  Restore  History

Download this file

25 lines (21 with data), 707 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//=============================================================================
//! Samll Real Double-precision Row Vector Class
template<long l> class drovector_small
{
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);
double operator()(const long& k) const;
//long get_m(){ return n; }
//long get_n(){ return n; }
void zero(){ for(long k=0; k<l; k++){array[k]=0.;} }
drovector_small<l>& set(const long& k, const double& v){ (*this)(k)=v; return *this; }
};
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.