#ifndef __devec_inl__ #define __devec_inl__ #if !(defined(__devec_h__)) # error "devec.inl should only be included by devec.h" #endif template inline DE::Vector::Vector() { for (unsigned int i=0;i inline DE::Vector::~Vector() { // empty return; } template inline DE::Vector::Vector(const Vector& other) { *this = other; return; } template inline DE::Vector& DE::Vector::operator= (const Vector& other) { for (unsigned int i=0;i inline DE::Vector& DE::Vector::operator+= (const Vector& other) { for (unsigned int i=0;i inline DE::Vector DE::Vector::operator+ (const Vector& other) { Vector tmp(*this); tmp += other; return tmp; } template inline DE::Vector& DE::Vector::operator-= (const Vector& other) { for (unsigned int i=0;i inline DE::Vector DE::Vector::operator- (const Vector& other) { Vector tmp(*this); tmp -= other; return tmp; } template inline DE::Vector& DE::Vector::operator*= (const double& multiplier) { for (unsigned int i=0;i inline DE::Vector DE::Vector::operator* (const double& multiplier) { Vector tmp(*this); tmp *= multiplier; return tmp; } template inline DE::Vector& DE::Vector::operator/= (const double& divisor) { for (unsigned int i=0;i inline DE::Vector DE::Vector::operator/ (const double& divisor) { Vector tmp(*this); tmp /= divisor; return tmp; } template inline const double& DE::Vector::operator[] (unsigned int i) const { return tuple[i]; } template inline double& DE::Vector::operator[] (unsigned int i) { return tuple[i]; } template inline DE::Vector::operator const double* () const { return tuple; } template inline DE::Vector::operator double* () { return tuple; } #endif // __devec_inl__