tinyvec.cc
来自「c++经典教材 Blitz++ v0.8」· CC 代码 · 共 691 行 · 第 1/2 页
CC
691 行
return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator/=(const TinyVector<P_numtype2, N_length>& x){ (*this) /= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator%=(const TinyVector<P_numtype2, N_length>& x){ (*this) %= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator^=(const TinyVector<P_numtype2, N_length>& x){ (*this) ^= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator&=(const TinyVector<P_numtype2, N_length>& x){ (*this) &= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator|=(const TinyVector<P_numtype2, N_length>& x){ (*this) |= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator<<=(const TinyVector<P_numtype2, N_length>& x){ (*this) <<= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator>>=(const TinyVector<P_numtype2, N_length>& x){ (*this) >>= _bz_VecExpr<_bz_typename TinyVector<P_numtype2, N_length>::T_constIterator>(x.begin()); return *this;}/***************************************************************************** * Assignment operators with Vector operand */template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator=(const Vector<P_numtype2>& x){ (*this) = x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator+=(const Vector<P_numtype2>& x){ (*this) += x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator-=(const Vector<P_numtype2>& x){ (*this) -= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator*=(const Vector<P_numtype2>& x){ (*this) *= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator/=(const Vector<P_numtype2>& x){ (*this) /= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator%=(const Vector<P_numtype2>& x){ (*this) %= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator^=(const Vector<P_numtype2>& x){ (*this) ^= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator&=(const Vector<P_numtype2>& x){ (*this) &= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator|=(const Vector<P_numtype2>& x){ (*this) |= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator<<=(const Vector<P_numtype2>& x){ (*this) <<= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator>>=(const Vector<P_numtype2>& x){ (*this) >>= x._bz_asVecExpr(); return *this;}/***************************************************************************** * Assignment operators with Range operand */template<typename P_numtype, int N_length> inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator=(Range r){ (*this) = r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator+=(Range r){ (*this) += r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator-=(Range r){ (*this) -= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator*=(Range r){ (*this) *= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator/=(Range r){ (*this) /= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator%=(Range r){ (*this) %= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator^=(Range r){ (*this) ^= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator&=(Range r){ (*this) &= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator|=(Range r){ (*this) |= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator<<=(Range r){ (*this) <<= r._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator>>=(Range r){ (*this) >>= r._bz_asVecExpr(); return *this;}/***************************************************************************** * Assignment operators with VectorPick operand */template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator=(const VectorPick<P_numtype2>& x){ (*this) = x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator+=(const VectorPick<P_numtype2>& x){ (*this) += x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator-=(const VectorPick<P_numtype2>& x){ (*this) -= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator*=(const VectorPick<P_numtype2>& x){ (*this) *= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator/=(const VectorPick<P_numtype2>& x){ (*this) /= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator%=(const VectorPick<P_numtype2>& x){ (*this) %= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator^=(const VectorPick<P_numtype2>& x){ (*this) ^= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator&=(const VectorPick<P_numtype2>& x){ (*this) &= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator|=(const VectorPick<P_numtype2>& x){ (*this) |= x._bz_asVecExpr(); return *this;}template<typename P_numtype, int N_length> template<typename P_numtype2>inline TinyVector<P_numtype, N_length>&TinyVector<P_numtype, N_length>::operator>>=(const VectorPick<P_numtype2>& x){ (*this) <<= x._bz_asVecExpr(); return *this;}BZ_NAMESPACE_END#endif // BZ_TINYVEC_CC
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?