Namespaces
Variants

cpp/header/numeric: Difference between revisions

From cppreference.com
Fruderica (talk | contribs)
mNo edit summary
Space Mission (talk | contribs)
m Synopsis: upd. by current draft: only ranges::iota was added
Line 233: Line 233:
   template<class ForwardIt, class T>
   template<class ForwardIt, class T>
     constexpr void iota(ForwardIt first, ForwardIt last, T value);
     constexpr void iota(ForwardIt first, ForwardIt last, T value);


   // greatest common divisor
   // greatest common divisor

Revision as of 21:16, 7 March 2022

 
 
Standard library headers
 

This header is part of the numeric library.

Functions

(C++11)
fills a range with successive increments of the starting value
(function template) [edit]
sums up or folds a range of elements
(function template) [edit]
(C++17)
similar to std::accumulate, except out of order
(function template) [edit]
applies an invocable, then reduces out of order
(function template) [edit]
computes the inner product of two ranges of elements
(function template) [edit]
computes the differences between adjacent elements in a range
(function template) [edit]
computes the partial sum of a range of elements
(function template) [edit]
similar to std::partial_sum, includes the ith input element in the ith sum
(function template) [edit]
similar to std::partial_sum, excludes the ith input element from the ith sum
(function template) [edit]
applies an invocable, then calculates inclusive scan
(function template) [edit]
applies an invocable, then calculates exclusive scan
(function template) [edit]
(C++17)
computes the greatest common divisor of two integers
(function template) [edit]
(C++17)
computes the least common multiple of two integers
(function template) [edit]
(C++20)
midpoint between two numbers or pointers
(function template) [edit]

Synopsis

{{{1}}}