📄 uops.cc
字号:
/***************************************************************************
* blitz/arrayuops.cc Expression templates for arrays, unary functions
*
* $Id$
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Suggestions: blitz-suggest@cybervision.com
* Bugs: blitz-bugs@cybervision.com
*
* For more information, please see the Blitz++ Home Page:
* http://seurat.uwaterloo.ca/blitz/
*
***************************************************************************
* $Log$
*/
// Generated source file. Do not edit.
// genarruops.cpp Dec 5 1998 17:08:40
#ifndef BZ_ARRAYUOPS_CC
#define BZ_ARRAYUOPS_CC
#ifndef BZ_ARRAYEXPR_H
#error <blitz/arrayuops.cc> must be included after <blitz/arrayexpr.h>
#endif // BZ_ARRAYEXPR_H
BZ_NAMESPACE(blitz)
/****************************************************************************
* abs
****************************************************************************/
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_abs<T_numtype1> > >
abs(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_abs<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> > >
abs(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_abs<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> > >
abs(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_abs<int> >(d1);
}
/****************************************************************************
* acos
****************************************************************************/
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acos<T_numtype1> > >
acos(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acos<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> > >
acos(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acos<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acos<int> > >
acos(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acos<int> >(d1);
}
/****************************************************************************
* acosh
****************************************************************************/
#ifdef BZ_HAVE_IEEE_MATH
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acosh<T_numtype1> > >
acosh(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_acosh<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> > >
acosh(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_acosh<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acosh<int> > >
acosh(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_acosh<int> >(d1);
}
#endif
/****************************************************************************
* asin
****************************************************************************/
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asin<T_numtype1> > >
asin(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asin<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> > >
asin(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asin<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asin<int> > >
asin(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asin<int> >(d1);
}
/****************************************************************************
* asinh
****************************************************************************/
#ifdef BZ_HAVE_IEEE_MATH
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asinh<T_numtype1> > >
asinh(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_asinh<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> > >
asinh(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_asinh<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asinh<int> > >
asinh(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_asinh<int> >(d1);
}
#endif
/****************************************************************************
* atan
****************************************************************************/
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atan<T_numtype1> > >
atan(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atan<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> > >
atan(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atan<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atan<int> > >
atan(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atan<int> >(d1);
}
/****************************************************************************
* atanh
****************************************************************************/
#ifdef BZ_HAVE_IEEE_MATH
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atanh<T_numtype1> > >
atanh(const Array<T_numtype1, N_rank1>& d1)
{
return _bz_ArrayExprUnaryOp<ArrayIterator<T_numtype1, N_rank1>,
_bz_atanh<T_numtype1> >(d1.begin());
}
template<class P_expr1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> > >
atanh(_bz_ArrayExpr<P_expr1> d1)
{
return _bz_ArrayExprUnaryOp<_bz_ArrayExpr<P_expr1>,
_bz_atanh<_bz_typename P_expr1::T_numtype> >(d1);
}
template<int N_index1>
inline
_bz_ArrayExpr<_bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atanh<int> > >
atanh(IndexPlaceholder<N_index1> d1)
{
return _bz_ArrayExprUnaryOp<IndexPlaceholder<N_index1>,
_bz_atanh<int> >(d1);
}
#endif
/****************************************************************************
* atan2
****************************************************************************/
template<class T_numtype1, int N_rank1, class T_numtype2, int N_rank2>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterator<T_numtype2, N_rank2>,
_bz_atan2<T_numtype1,T_numtype2> > >
atan2(const Array<T_numtype1, N_rank1>& d1, const Array<T_numtype2, N_rank2>& d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, ArrayIterator<T_numtype2, N_rank2>,
_bz_atan2<T_numtype1,T_numtype2> >(d1.begin(), d2.begin());
}
template<class T_numtype1, int N_rank1, class P_expr2>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<P_expr2>,
_bz_atan2<T_numtype1,_bz_typename P_expr2::T_numtype> > >
atan2(const Array<T_numtype1, N_rank1>& d1, _bz_ArrayExpr<P_expr2> d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExpr<P_expr2>,
_bz_atan2<T_numtype1,_bz_typename P_expr2::T_numtype> >(d1.begin(), d2);
}
template<class T_numtype1, int N_rank1, int N_index2>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceholder<N_index2>,
_bz_atan2<T_numtype1,int> > >
atan2(const Array<T_numtype1, N_rank1>& d1, IndexPlaceholder<N_index2> d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, IndexPlaceholder<N_index2>,
_bz_atan2<T_numtype1,int> >(d1.begin(), d2);
}
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<float>,
_bz_atan2<T_numtype1,float> > >
atan2(const Array<T_numtype1, N_rank1>& d1, float d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<float>,
_bz_atan2<T_numtype1,float> >(d1.begin(), _bz_ArrayExprConstant<float>(d2));
}
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<double>,
_bz_atan2<T_numtype1,double> > >
atan2(const Array<T_numtype1, N_rank1>& d1, double d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<double>,
_bz_atan2<T_numtype1,double> >(d1.begin(), _bz_ArrayExprConstant<double>(d2));
}
template<class T_numtype1, int N_rank1>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<long double>,
_bz_atan2<T_numtype1,long double> > >
atan2(const Array<T_numtype1, N_rank1>& d1, long double d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<long double>,
_bz_atan2<T_numtype1,long double> >(d1.begin(), _bz_ArrayExprConstant<long double>(d2));
}
#ifdef BZ_HAVE_COMPLEX
template<class T_numtype1, int N_rank1, class T2>
inline
_bz_ArrayExpr<_bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<complex<T2> > ,
_bz_atan2<T_numtype1,complex<T2> > > >
atan2(const Array<T_numtype1, N_rank1>& d1, complex<T2> d2)
{
return _bz_ArrayExprOp<ArrayIterator<T_numtype1, N_rank1>, _bz_ArrayExprConstant<complex<T2> > ,
_bz_atan2<T_numtype1,complex<T2> > >(d1.begin(), _bz_ArrayExprConstant<complex<T2> > (d2));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -