📄 vecbops.cc
字号:
Range,
_bz_Add<complex<T1> , int > > >
operator+(complex<T1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
Range,
_bz_Add<complex<T1> , int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1),
d2));
}
#endif // BZ_HAVE_COMPLEX
#ifdef BZ_HAVE_COMPLEX
// complex<T1> + TinyVector<P_numtype2, N_length2>
template<class T1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<complex<T1> , P_numtype2 > > >
operator+(complex<T1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExprConstant<complex<T1> > ,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Add<complex<T1> , P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(_bz_VecExprConstant<complex<T1> > (d1),
d2.begin()));
}
#endif // BZ_HAVE_COMPLEX
/****************************************************************************
* Subtraction Operators
****************************************************************************/
// Vector<P_numtype1> - Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2.begin()));
}
// Vector<P_numtype1> - _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > >
operator-(const Vector<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2));
}
// Vector<P_numtype1> - VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2.begin()));
}
// Vector<P_numtype1> - Range
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Subtract<P_numtype1, int > > >
operator-(const Vector<P_numtype1>& d1,
Range d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
Range,
_bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2));
}
// Vector<P_numtype1> - TinyVector<P_numtype2, N_length2>
template<class P_numtype1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const Vector<P_numtype1>& d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2.begin()));
}
// Vector<P_numtype1> - int
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int > > >
operator-(const Vector<P_numtype1>& d1,
int d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<int>,
_bz_Subtract<P_numtype1, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
_bz_VecExprConstant<int>(d2)));
}
// Vector<P_numtype1> - float
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float > > >
operator-(const Vector<P_numtype1>& d1,
float d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<float>,
_bz_Subtract<P_numtype1, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
_bz_VecExprConstant<float>(d2)));
}
// Vector<P_numtype1> - double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double > > >
operator-(const Vector<P_numtype1>& d1,
double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<double>,
_bz_Subtract<P_numtype1, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
_bz_VecExprConstant<double>(d2)));
}
// Vector<P_numtype1> - long double
template<class P_numtype1>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double > > >
operator-(const Vector<P_numtype1>& d1,
long double d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<long double>,
_bz_Subtract<P_numtype1, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// Vector<P_numtype1> - complex<T2>
template<class P_numtype1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > >
operator-(const Vector<P_numtype1>& d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<VectorIterConst<P_numtype1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<P_numtype1, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> - Vector<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin()));
}
// _bz_VecExpr<P_expr1> - _bz_VecExpr<P_expr2>
template<class P_expr1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype > > >
operator-(_bz_VecExpr<P_expr1> d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, _bz_typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> - VectorPick<P_numtype2>
template<class P_expr1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1,
const VectorPick<P_numtype2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
VectorPickIterConst<P_numtype2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin()));
}
// _bz_VecExpr<P_expr1> - Range
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int > > >
operator-(_bz_VecExpr<P_expr1> d1,
Range d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
Range,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2));
}
// _bz_VecExpr<P_expr1> - TinyVector<P_numtype2, N_length2>
template<class P_expr1, class P_numtype2, int N_length2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2 > > >
operator-(_bz_VecExpr<P_expr1> d1,
const TinyVector<P_numtype2, N_length2>& d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
TinyVectorIterConst<P_numtype2, N_length2>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
d2.begin()));
}
// _bz_VecExpr<P_expr1> - int
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int > > >
operator-(_bz_VecExpr<P_expr1> d1,
int d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<int>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, int> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<int>(d2)));
}
// _bz_VecExpr<P_expr1> - float
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float > > >
operator-(_bz_VecExpr<P_expr1> d1,
float d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<float>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, float> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<float>(d2)));
}
// _bz_VecExpr<P_expr1> - double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double > > >
operator-(_bz_VecExpr<P_expr1> d1,
double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<double>(d2)));
}
// _bz_VecExpr<P_expr1> - long double
template<class P_expr1>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double > > >
operator-(_bz_VecExpr<P_expr1> d1,
long double d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<long double>,
_bz_Subtract<_bz_typename P_expr1::T_numtype, long double> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<long double>(d2)));
}
#ifdef BZ_HAVE_COMPLEX
// _bz_VecExpr<P_expr1> - complex<T2>
template<class P_expr1, class T2>
inline
_bz_VecExpr<_bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > >
operator-(_bz_VecExpr<P_expr1> d1,
complex<T2> d2)
{
typedef _bz_VecExprOp<_bz_VecExpr<P_expr1>,
_bz_VecExprConstant<complex<T2> > ,
_bz_Subtract<_bz_typename P_expr1::T_numtype, complex<T2> > > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1,
_bz_VecExprConstant<complex<T2> > (d2)));
}
#endif // BZ_HAVE_COMPLEX
// VectorPick<P_numtype1> - Vector<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const VectorPick<P_numtype1>& d1,
const Vector<P_numtype2>& d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2.begin()));
}
// VectorPick<P_numtype1> - _bz_VecExpr<P_expr2>
template<class P_numtype1, class P_expr2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype > > >
operator-(const VectorPick<P_numtype1>& d1,
_bz_VecExpr<P_expr2> d2)
{
typedef _bz_VecExprOp<VectorPickIterConst<P_numtype1>,
_bz_VecExpr<P_expr2>,
_bz_Subtract<P_numtype1, _bz_typename P_expr2::T_numtype> > T_expr;
return _bz_VecExpr<T_expr>(T_expr(d1.begin(),
d2));
}
// VectorPick<P_numtype1> - VectorPick<P_numtype2>
template<class P_numtype1, class P_numtype2>
inline
_bz_VecExpr<_bz_VecExprOp<VectorPickIterConst<P_numtype1>,
VectorPickIterConst<P_numtype2>,
_bz_Subtract<P_numtype1, P_numtype2 > > >
operator-(const VectorPick<P_numtype1>& d1,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -