Warning, file /include/boost/geometry/algorithms/detail/multi_sum.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_SUM_HPP
0019 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_MULTI_SUM_HPP
0020
0021 #include <boost/range/begin.hpp>
0022 #include <boost/range/end.hpp>
0023
0024
0025 namespace boost { namespace geometry
0026 {
0027 #ifndef DOXYGEN_NO_DETAIL
0028 namespace detail
0029 {
0030
0031 struct multi_sum
0032 {
0033 template <typename ReturnType, typename Policy, typename MultiGeometry, typename Strategy>
0034 static inline ReturnType apply(MultiGeometry const& multi, Strategy const& strategy)
0035 {
0036 ReturnType sum = ReturnType();
0037 for (auto it = boost::begin(multi); it != boost::end(multi); ++it)
0038 {
0039 sum += Policy::apply(*it, strategy);
0040 }
0041 return sum;
0042 }
0043 };
0044
0045
0046 }
0047 #endif
0048
0049 }}
0050
0051
0052 #endif