57 #define _EXT_NUMERIC 1
59 #pragma GCC system_header
66 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
68 _GLIBCXX_BEGIN_NAMESPACE_VERSION
72 template<
typename _Tp,
typename _Integer,
typename _Mono
idOperation>
74 __power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
77 return identity_element(__monoid_op);
80 while ((__n & 1) == 0)
83 __x = __monoid_op(__x, __x);
90 __x = __monoid_op(__x, __x);
92 __result = __monoid_op(__result, __x);
99 template<
typename _Tp,
typename _Integer>
101 __power(_Tp __x, _Integer __n)
111 template<
typename _Tp,
typename _Integer,
typename _Mono
idOperation>
113 power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
114 {
return __power(__x, __n, __monoid_op); }
121 template<
typename _Tp,
typename _Integer>
124 {
return __power(__x, __n); }
126 #ifdef __GXX_EXPERIMENTAL_CXX0X__
135 template<
typename _ForwardIter,
typename _Tp>
137 iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
140 __glibcxx_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
141 __glibcxx_function_requires(_ConvertibleConcept<_Tp,
142 typename std::iterator_traits<_ForwardIter>::value_type>)
144 while (__first != __last)
145 *__first++ = __value++;
147 #endif // __GXX_EXPERIMENTAL_CXX0X__
149 _GLIBCXX_END_NAMESPACE_VERSION
One of the math functors.
void iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
Create a range of sequentially increasing values.
_Tp power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)