20 #ifndef OPM_FUNCTIONAL_HPP
21 #define OPM_FUNCTIONAL_HPP
82 template<
typename F,
typename C >
83 std::vector<
typename std::result_of< F(
typename C::const_iterator::value_type& ) >::type >
84 map( F f,
const C& src ) {
85 using A =
typename C::const_iterator::value_type;
86 using B =
typename std::result_of< F( A& ) >::type;
88 ret.reserve( src.size() );
90 std::transform( src.begin(), src.end(), std::back_inserter( ret ), f );
104 template<
typename A >
105 std::vector< A > concat( std::vector< std::vector< A > >&& src ) {
106 const auto size = std::accumulate( src.begin(), src.end(), 0,
107 []( std::size_t acc,
const std::vector< A >& x ) {
108 return acc + x.size();
112 std::vector< A > dst;
116 std::move( x.begin(), x.end(), std::back_inserter( dst ) );
198 explicit iota(
int end );
199 iota(
int begin,
int end );
203 using difference_type = int;
204 using value_type = int;
205 using pointer =
int*;
206 using reference =
int&;
207 using iterator_category = std::forward_iterator_tag;
211 int operator*()
const;
Definition: Functional.hpp:201
Definition: Functional.hpp:196
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29