/
usr
/
include
/
boost
/
range
/
/usr/include/boost/range
mkdir
upload
Name
Size
Mode
Actions
adaptor/
-
0755
rm
algorithm/
-
0755
rm
algorithm_ext/
-
0755
rm
detail/
-
0755
rm
adaptors.hpp
1096
0644
edit
dl
rm
algorithm.hpp
3910
0644
edit
dl
rm
algorithm_ext.hpp
1075
0644
edit
dl
rm
any_range.hpp
6584
0644
edit
dl
rm
as_array.hpp
951
0644
edit
dl
rm
as_literal.hpp
3837
0644
edit
dl
rm
atl.hpp
16840
0644
edit
dl
rm
begin.hpp
3555
0644
edit
dl
rm
category.hpp
698
0644
edit
dl
rm
combine.hpp
1156
0644
edit
dl
rm
concepts.hpp
13632
0644
edit
dl
rm
config.hpp
1316
0644
edit
dl
rm
const_iterator.hpp
1924
0644
edit
dl
rm
const_reverse_iterator.hpp
1001
0644
edit
dl
rm
counting_range.hpp
2216
0644
edit
dl
rm
difference_type.hpp
1224
0644
edit
dl
rm
distance.hpp
988
0644
edit
dl
rm
empty.hpp
710
0644
edit
dl
rm
end.hpp
3615
0644
edit
dl
rm
functions.hpp
680
0644
edit
dl
rm
has_range_iterator.hpp
2375
0644
edit
dl
rm
irange.hpp
8020
0644
edit
dl
rm
istream_range.hpp
1097
0644
edit
dl
rm
iterator.hpp
1978
0644
edit
dl
rm
iterator_range.hpp
530
0644
edit
dl
rm
iterator_range_core.hpp
27439
0644
edit
dl
rm
iterator_range_hash.hpp
570
0644
edit
dl
rm
iterator_range_io.hpp
2656
0644
edit
dl
rm
join.hpp
2825
0644
edit
dl
rm
metafunctions.hpp
808
0644
edit
dl
rm
mfc.hpp
24340
0644
edit
dl
rm
mfc_map.hpp
3866
0644
edit
dl
rm
mutable_iterator.hpp
2031
0644
edit
dl
rm
numeric.hpp
6068
0644
edit
dl
rm
pointer.hpp
730
0644
edit
dl
rm
range_fwd.hpp
1366
0644
edit
dl
rm
rbegin.hpp
1188
0644
edit
dl
rm
reference.hpp
712
0644
edit
dl
rm
rend.hpp
1189
0644
edit
dl
rm
result_iterator.hpp
811
0644
edit
dl
rm
reverse_iterator.hpp
1095
0644
edit
dl
rm
reverse_result_iterator.hpp
865
0644
edit
dl
rm
size.hpp
2194
0644
edit
dl
rm
size_type.hpp
2298
0644
edit
dl
rm
sub_range.hpp
7755
0644
edit
dl
rm
traversal.hpp
731
0644
edit
dl
rm
value_type.hpp
697
0644
edit
dl
rm
Edit:
/usr/include/boost/range/numeric.hpp
(6068B)
// Copyright 2009-2014 Neil Groves. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright 2006 Thorsten Ottosen. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright 2004 Eric Niebler. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Contains range-based versions of the numeric std algorithms // #if defined(_MSC_VER) #pragma once #endif #ifndef BOOST_RANGE_NUMERIC_HPP #define BOOST_RANGE_NUMERIC_HPP #include <boost/config.hpp> #include <boost/assert.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/category.hpp> #include <boost/range/concepts.hpp> #include <boost/range/distance.hpp> #include <boost/range/size.hpp> #include <numeric> namespace boost { template<class SinglePassRange, class Value> inline Value accumulate(const SinglePassRange& rng, Value init) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>)); return std::accumulate(boost::begin(rng), boost::end(rng), init); } template<class SinglePassRange, class Value, class BinaryOperation> inline Value accumulate(const SinglePassRange& rng, Value init, BinaryOperation op) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange> )); return std::accumulate(boost::begin(rng), boost::end(rng), init, op); } namespace range_detail { template<class SinglePassRange1, class SinglePassRange2> inline bool inner_product_precondition( const SinglePassRange1&, const SinglePassRange2&, std::input_iterator_tag, std::input_iterator_tag) { return true; } template<class SinglePassRange1, class SinglePassRange2> inline bool inner_product_precondition( const SinglePassRange1& rng1, const SinglePassRange2& rng2, std::forward_iterator_tag, std::forward_iterator_tag) { return boost::size(rng2) >= boost::size(rng1); } } // namespace range_detail template< class SinglePassRange1, class SinglePassRange2, class Value > inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1>)); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2>)); BOOST_ASSERT( range_detail::inner_product_precondition( rng1, rng2, typename range_category<const SinglePassRange1>::type(), typename range_category<const SinglePassRange2>::type())); return std::inner_product( boost::begin(rng1), boost::end(rng1), boost::begin(rng2), init); } template< class SinglePassRange1, class SinglePassRange2, class Value, class BinaryOperation1, class BinaryOperation2 > inline Value inner_product( const SinglePassRange1& rng1, const SinglePassRange2& rng2, Value init, BinaryOperation1 op1, BinaryOperation2 op2) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange1>)); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange2>)); BOOST_ASSERT( range_detail::inner_product_precondition( rng1, rng2, typename range_category<const SinglePassRange1>::type(), typename range_category<const SinglePassRange2>::type())); return std::inner_product( boost::begin(rng1), boost::end(rng1), boost::begin(rng2), init, op1, op2); } template<class SinglePassRange, class OutputIterator> inline OutputIterator partial_sum(const SinglePassRange& rng, OutputIterator result) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>)); return std::partial_sum(boost::begin(rng), boost::end(rng), result); } template<class SinglePassRange, class OutputIterator, class BinaryOperation> inline OutputIterator partial_sum( const SinglePassRange& rng, OutputIterator result, BinaryOperation op) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>)); return std::partial_sum(boost::begin(rng), boost::end(rng), result, op); } template<class SinglePassRange, class OutputIterator> inline OutputIterator adjacent_difference( const SinglePassRange& rng, OutputIterator result) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>)); return std::adjacent_difference(boost::begin(rng), boost::end(rng), result); } template<class SinglePassRange, class OutputIterator, class BinaryOperation> inline OutputIterator adjacent_difference( const SinglePassRange& rng, OutputIterator result, BinaryOperation op) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept<const SinglePassRange>)); return std::adjacent_difference(boost::begin(rng), boost::end(rng), result, op); } } // namespace boost #endif
Save
cmd:
run