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
40template <
class _InputIterator,
class _Tp>
44 for ( ; __first !=
__last; ++__first)
45 _Init = _Init + *__first;
49template <
class _InputIterator,
class _Tp,
class _BinaryOperation>
52 _BinaryOperation __binary_op) {
54 for ( ; __first !=
__last; ++__first)
55 _Init = __binary_op(_Init, *__first);
59template <
class _InputIterator1,
class _InputIterator2,
class _Tp>
62 _InputIterator2 __first2, _Tp _Init) {
64 for ( ; __first1 != __last1; ++__first1, ++__first2)
65 _Init = _Init + (*__first1 * *__first2);
69template <
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));
84template <
class _InputIterator,
class _OutputIterator,
class _Tp,
85 class _BinaryOperation>
88 _OutputIterator __result, _Tp*, _BinaryOperation __binary_op);
92template <
class _InputIterator,
class _OutputIterator>
95 _OutputIterator __result) {
100template <
class _InputIterator,
class _OutputIterator,
class _BinaryOperation>
101inline _OutputIterator
103 _OutputIterator __result, _BinaryOperation __binary_op) {
110template <
class _InputIterator,
class _OutputIterator,
class _Tp,
111 class _BinaryOperation>
114 _OutputIterator __result, _Tp*,
115 _BinaryOperation __binary_op);
119template <
class _InputIterator,
class _OutputIterator>
120inline _OutputIterator
122 _InputIterator
__last, _OutputIterator __result) {
128template <
class _InputIterator,
class _OutputIterator,
class _BinaryOperation>
131 _OutputIterator __result, _BinaryOperation __binary_op) {
139template <
class _Tp,
class _Integer,
class _Mono
idOperation>
140_Tp
__power(_Tp __x, _Integer
__n, _MonoidOperation __opr);
144#if !defined (_STLP_NO_EXTENSIONS)
151template <
class _Tp,
class _Integer>
160template <
class _Tp,
class _Integer,
class _Mono
idOperation>
161inline _Tp
power(_Tp __x, _Integer
__n, _MonoidOperation __opr) {
165template <
class _Tp,
class _Integer>
172template <
class _ForwardIterator,
class _Tp>
177 *__first++ =
__val++;
183#if !defined (_STLP_LINK_TIME_INSTANTIATION)
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_DEBUG_CHECK(expr)
_STLP_MOVE_TO_PRIV_NAMESPACE plus< _Tp > __plus(_Tp *)
minus< _Tp > __minus(_Tp *)
#define _STLP_VALUE_TYPE(_It, _Tp)
_STLP_BEGIN_NAMESPACE _STLP_INLINE_LOOP _Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init)
_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)
_STLP_MOVE_TO_STD_NAMESPACE _OutputIterator partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
_STLP_MOVE_TO_STD_NAMESPACE _OutputIterator adjacent_difference(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
_STLP_MOVE_TO_PRIV_NAMESPACE _OutputIterator __partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op)
_STLP_INLINE_LOOP _Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp _Init)
_STLP_MOVE_TO_PRIV_NAMESPACE _Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr)
#define _STLP_INLINE_LOOP
#define _STLP_MOVE_TO_STD_NAMESPACE
#define _STLP_BEGIN_NAMESPACE
#define _STLP_END_NAMESPACE
#define _STLP_MOVE_TO_PRIV_NAMESPACE