30 template <
class T,
int Num >
class TinyVector {
63 inline int no(
const T * ptr)
const {
return (ptr -
begin());}
72 if ( !( (i >= 0) && (i < Num) ) )
error(
"TinyVector<>::CheckSize(int i), index out of bound");
90 template <
class T,
int Num >
inline 95 for (
int i=0; i<Num; ++i)
102 template <
class T,
int Num >
inline 106 for (
int i=0; i<Num; ++i)
113 template <
class T,
int Num >
inline 117 for (
int i=0; i<Num; ++i)
123 template <
class T,
int Num >
inline 124 std::ostream& operator << (std::ostream& os, const TinyVector< T, Num >& v)
126 os.setf(std::ios::fixed,std::ios::floatfield);
128 for (
int i=0; i<Num; ++i)
129 os << std::setw(12) << v[i];
void copy(const TinyVector< T, Num > &a)
TinyVector< T, Num > & operator=(const TinyVector< T, Num > &a)
REAL val(STATE &number)
Returns value of the variable.
AutoPointerMutexArrayInit tmp
int no(const T *ptr) const
TinyVector< T, Num > & operator+=(const TinyVector< T, Num > &v)
void CheckSize(int i) const
TinyVector(const TinyVector< T, Num > &a)
TinyVector< T, Num > & operator=(const T &val)
void Copy(TinyVector< T, Num > &y, const TinyVector< T, Num > &x)
TinyVector< T, Num > operator*(const T &val, const TinyVector< T, Num > &v)
TinyVector< T, Num > & operator-=(const TinyVector< T, Num > &v)