27 #ifndef _STLP_INTERNAL_NUMERIC_H 28 #define _STLP_INTERNAL_NUMERIC_H 30 #ifndef _STLP_INTERNAL_FUNCTION_BASE_H 34 #ifndef _STLP_INTERNAL_ITERATOR_BASE_H 40 template <
class _InputIterator,
class _Tp>
44 for ( ; __first !=
__last; ++__first)
45 _Init = _Init + *__first;
49 template <
class _InputIterator,
class _Tp,
class _BinaryOperation>
52 _BinaryOperation __binary_op) {
54 for ( ; __first !=
__last; ++__first)
55 _Init = __binary_op(_Init, *__first);
59 template <
class _InputIterator1,
class _InputIterator2,
class _Tp>
62 _InputIterator2 __first2, _Tp _Init) {
64 for ( ; __first1 != __last1; ++__first1, ++__first2)
65 _Init = _Init + (*__first1 * *__first2);
69 template <
class _InputIterator1,
class _InputIterator2,
class _Tp,
70 class _BinaryOperation1,
class _BinaryOperation2>
73 _InputIterator2 __first2, _Tp _Init,
74 _BinaryOperation1 __binary_op1,
75 _BinaryOperation2 __binary_op2) {
77 for ( ; __first1 != __last1; ++__first1, ++__first2)
78 _Init = __binary_op1(_Init, __binary_op2(*__first1, *__first2));
84 template <
class _InputIterator,
class _OutputIterator,
class _Tp,
85 class _BinaryOperation>
88 _OutputIterator __result, _Tp*, _BinaryOperation __binary_op);
92 template <
class _InputIterator,
class _OutputIterator>
93 inline _OutputIterator
95 _OutputIterator __result) {
100 template <
class _InputIterator,
class _OutputIterator,
class _BinaryOperation>
101 inline _OutputIterator
103 _OutputIterator __result, _BinaryOperation __binary_op) {
110 template <
class _InputIterator,
class _OutputIterator,
class _Tp,
111 class _BinaryOperation>
114 _OutputIterator __result, _Tp*,
115 _BinaryOperation __binary_op);
119 template <
class _InputIterator,
class _OutputIterator>
120 inline _OutputIterator
122 _InputIterator
__last, _OutputIterator __result) {
128 template <
class _InputIterator,
class _OutputIterator,
class _BinaryOperation>
131 _OutputIterator __result, _BinaryOperation __binary_op) {
139 template <
class _Tp,
class _Integer,
class _Mono
idOperation>
140 _Tp
__power(_Tp __x, _Integer
__n, _MonoidOperation __opr);
144 #if !defined (_STLP_NO_EXTENSIONS) 151 template <
class _Tp,
class _Integer>
160 template <
class _Tp,
class _Integer,
class _Mono
idOperation>
161 inline _Tp
power(_Tp __x, _Integer
__n, _MonoidOperation __opr) {
165 template <
class _Tp,
class _Integer>
172 template <
class _ForwardIterator,
class _Tp>
177 *__first++ =
__val++;
183 #if !defined (_STLP_LINK_TIME_INSTANTIATION) _STLP_MOVE_TO_STD_NAMESPACE _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr)
_STLP_MOVE_TO_PRIV_NAMESPACE _Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr)
_STLP_INLINE_LOOP void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __val)
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIterator __adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op)
minus< _Tp > __minus(_Tp *)
#define _STLP_MOVE_TO_PRIV_NAMESPACE
_STLP_MOVE_TO_STD_NAMESPACE _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
_STLP_MOVE_TO_PRIV_NAMESPACE plus< _Tp > __plus(_Tp *)
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp _Init)
#define _STLP_MOVE_TO_STD_NAMESPACE
_STLP_BEGIN_NAMESPACE _STLP_INLINE_LOOP _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init)
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIterator __partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op)
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_INLINE_LOOP
#define _STLP_VALUE_TYPE(_It, _Tp)
_STLP_MOVE_TO_STD_NAMESPACE _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
#define _STLP_DEBUG_CHECK(expr)
#define _STLP_END_NAMESPACE
#define _STLP_BEGIN_NAMESPACE