namespace cloonel { ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- template Vector::Vector (T parValue) : m_mem {parValue} { } ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- template template Vector::Vector (const Vector& parOther) { for (uint32_t z = 0; z < S; ++z) { m_mem[z] = parOther.m_mem[z]; } } ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- template template const Vector& Vector::operator+= (const Vector& parOther) { for (uint32_t z = 0; z < S; ++z) { m_mem[z] += parOther.m_mem[z]; } return *this; } template template const Vector& Vector::operator-= (const Vector& parOther) { for (uint32_t z = 0; z < S; ++z) { m_mem[z] -= parOther.m_mem[z]; } return *this; } template template const Vector& Vector::operator*= (const Vector& parOther) { for (uint32_t z = 0; z < S; ++z) { m_mem[z] *= parOther.m_mem[z]; } return *this; } template template const Vector& Vector::operator/= (const Vector& parOther) { for (uint32_t z = 0; z < S; ++z) { m_mem[z] /= parOther.m_mem[z]; } return *this; } ///------------------------------------------------------------------------- ///------------------------------------------------------------------------- template inline Vector::type, S> operator+ (const Vector& parA, const Vector& parB) { typedef typename std::common_type::type RetType; Vector retVal(parA); parA += parB; return retVal; } template inline Vector::type, S> operator- (const Vector& parA, const Vector& parB) { typedef typename std::common_type::type RetType; Vector retVal(parA); parA -= parB; return retVal; } template inline Vector::type, S> operator* (const Vector& parA, const Vector& parB) { typedef typename std::common_type::type RetType; Vector retVal(parA); parA *= parB; return retVal; } template inline Vector::type, S> operator/ (const Vector& parA, const Vector& parB) { typedef typename std::common_type::type RetType; Vector retVal(parA); parA /= parB; return retVal; } } //namespace cloonel