OGS
NumLib::anonymous_namespace{LocalToGlobalIndexMap.cpp} Namespace Reference

Functions

template<typename T >
std::vector< T > to_cumulative (std::vector< T > const &vec)
 

Function Documentation

◆ to_cumulative()

template<typename T >
std::vector< T > NumLib::anonymous_namespace{LocalToGlobalIndexMap.cpp}::to_cumulative ( std::vector< T > const & vec)

Definition at line 23 of file LocalToGlobalIndexMap.cpp.

24{
25 std::vector<T> result(vec.size() + 1, 0);
26 std::partial_sum(vec.begin(), vec.end(), result.begin() + 1);
27
28 return result;
29}

References to_cumulative().

Referenced by to_cumulative().