3 // Copyright (C) 2007-2013 Free Software Foundation, Inc.
5 // This file is part of the GNU ISO C++ Library. This library is free
6 // software; you can redistribute it and/or modify it under the
7 // terms of the GNU General Public License as published by the
8 // Free Software Foundation; either version 3, or (at your option)
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING3. If not see
18 // <http://www.gnu.org/licenses/>.
23 template <class InputIterator
, class T
>
24 T
accumulate(InputIterator first
, InputIterator last
, T init
);
26 template <class InputIterator
, class T
, class BinaryOperation
>
27 T
accumulate(InputIterator first
, InputIterator last
, T init
,
28 BinaryOperation binary_op
);
30 template <class InputIterator1
, class InputIterator2
, class T
>
31 T
inner_product(InputIterator1 first1
, InputIterator1 last1
,
32 InputIterator2 first2
, T init
);
34 template <class InputIterator1
, class InputIterator2
, class T
,
35 class BinaryOperation1
, class BinaryOperation2
>
36 T
inner_product(InputIterator1 first1
, InputIterator1 last1
,
37 InputIterator2 first2
, T init
,
38 BinaryOperation1 binary_op1
,
39 BinaryOperation2 binary_op2
);
41 template <class InputIterator
, class OutputIterator
>
42 OutputIterator
partial_sum(InputIterator first
,
44 OutputIterator result
);
46 template <class InputIterator
, class OutputIterator
,
47 class BinaryOperation
>
48 OutputIterator
partial_sum(InputIterator first
,
50 OutputIterator result
,
51 BinaryOperation binary_op
);
53 template <class InputIterator
, class OutputIterator
>
54 OutputIterator
adjacent_difference(InputIterator first
,
56 OutputIterator result
);
58 template <class InputIterator
, class OutputIterator
,
59 class BinaryOperation
>
60 OutputIterator
adjacent_difference(InputIterator first
,
62 OutputIterator result
,
63 BinaryOperation binary_op
);