Go to the source code of this file.
|
template<class _InputIterator , class _OutputIterator , class _Tp , class _BinaryOperation > |
_STLP_BEGIN_NAMESPACE _STLP_MOVE_TO_PRIV_NAMESPACE _OutputIterator | __partial_sum (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op) |
|
template<class _InputIterator , class _OutputIterator , class _Tp , class _BinaryOperation > |
_OutputIterator | __adjacent_difference (_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp *, _BinaryOperation __binary_op) |
|
template<class _Tp , class _Integer , class _MonoidOperation > |
_Tp | __power (_Tp __x, _Integer __n, _MonoidOperation __opr) |
|
◆ _STLP_NUMERIC_C
◆ __adjacent_difference()
template<class _InputIterator , class _OutputIterator , class _Tp , class _BinaryOperation >
_OutputIterator __adjacent_difference |
( |
_InputIterator |
__first, |
|
|
_InputIterator |
__last, |
|
|
_OutputIterator |
__result, |
|
|
_Tp * |
, |
|
|
_BinaryOperation |
__binary_op |
|
) |
| |
Definition at line 57 of file _numeric.c.
61 if (__first ==
__last)
return __result;
64 while (++__first !=
__last) {
66 *++__result = __binary_op(__tmp,
__val);
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_DEBUG_CHECK(expr)
Referenced by adjacent_difference().
◆ __partial_sum()
template<class _InputIterator , class _OutputIterator , class _Tp , class _BinaryOperation >
Definition at line 40 of file _numeric.c.
43 if (__first ==
__last)
return __result;
47 while (++__first !=
__last) {
_STLP_INLINE_LOOP _InputIter __last
_STLP_INLINE_LOOP _InputIter const _Tp & __val
#define _STLP_DEBUG_CHECK(expr)
Referenced by partial_sum().
◆ __power()
template<class _Tp , class _Integer , class _MonoidOperation >
_Tp __power |
( |
_Tp |
__x, |
|
|
_Integer |
__n, |
|
|
_MonoidOperation |
__opr |
|
) |
| |
Definition at line 74 of file _numeric.c.
79 while ((
__n & 1) == 0) {
81 __x = __opr(__x, __x);
87 __x = __opr(__x, __x);
89 __result = __opr(__result, __x);
_Tp __identity_element(plus< _Tp >)
#define _STLP_MPWFIX_CATCH_ACTION(action)
#define _STLP_MPWFIX_CATCH
Referenced by __power(), power(), powT(), and rope< _CharT, _Alloc >::rope().