UtilAlgorithms.hpp
Go to the documentation of this file.
1 
28 //
29 // Created by aaltemoeller on 01.08.17.
30 //
31 
32 #ifndef LAS_VEGAS_UTILALGORITHMS_HPP
33 #define LAS_VEGAS_UTILALGORITHMS_HPP
34 
35 #include <iterator>
36 #include <type_traits>
37 #include <utility>
38 
41 
42 
43 namespace lvr2 {
44 
62 template<
63  template<typename, typename> typename OutMapT,
64  typename InMapT,
65  typename MapF
66 >
67 OutMapT<typename InMapT::HandleType, std::result_of_t<MapF(typename InMapT::ValueType)>> map(
68  const InMapT& mapIn,
69  MapF func
70 );
71 
77 template<
78  template<typename, typename> typename OutMapT,
79  typename IterProxyT,
80  typename GenF
81 >
82 OutMapT<
83  typename decltype(std::declval<IterProxyT>().begin())::HandleType,
84  typename std::result_of<GenF(typename decltype(std::declval<IterProxyT>().begin())::HandleType)>::type
85 >
87  IterProxyT iterProxy,
88  GenF func
89 );
90 
97 template<typename HandleT, typename ValueT>
98 pair<ValueT, ValueT> minMaxOfMap(const AttributeMap<HandleT, ValueT>& map);
99 
100 } // namespace lvr2
101 
102 #include "lvr2/algorithm/UtilAlgorithms.tcc"
103 
104 #endif //LAS_VEGAS_UTILALGORITHMS_HPP
OutMapT< typename decltype(std::declval< IterProxyT >).begin())::HandleType, typename std::result_of< GenF(typename decltype(std::declval< IterProxyT >).begin())::HandleType)>::type > attrMapFromFunc(IterProxyT iterProxy, GenF func)
Creates an attribute map by calling the given function for each element in the given iterator...
OutMapT< typename InMapT::HandleType, std::result_of_t< MapF(typename InMapT::ValueType)> > map(const InMapT &mapIn, MapF func)
Calls func for each value of the given map and save the result in the output map. ...
pair< ValueT, ValueT > minMaxOfMap(const AttributeMap< HandleT, ValueT > &map)
Returns the minimum and maximum element from the given map.


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:09