Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vvutils.hpp File Reference
#include <algorithm>
#include <iterator>
#include <ostream>
#include <set>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for vvutils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  vulpes::vvutils::internal::is_printable_container< T >
struct  vulpes::vvutils::internal::is_printable_container< std::vector< Args... > >
struct  vulpes::vvutils::internal::is_printable_container< std::set< Args... > >
struct  vulpes::vvutils::internal::is_printable_container< std::array< T, N > >

Namespaces

namespace  vulpes
namespace  vulpes::vvutils
namespace  vulpes::vvutils::internal
namespace  vulpes::vutils

Functions

template<typename Container>
std::ostream & vulpes::print (std::ostream &os, const Container &container, const std::string &separator=",", const std::string &postpend="\n", const std::string &prepend="")
 Print a container's elements to a stream, separated and wrapped by the given strings.
template<typename Container>
std::enable_if< vvutils::internal::is_printable_container< Container >::value, std::ostream & >::type vulpes::operator<< (std::ostream &os, const Container &container)
 Stream a std::vector, std::set, or std::array via print().
template<typename T, typename IndexType>
std::vector< T > vulpes::vutils::slice (const std::vector< T > &source, const std::vector< IndexType > &indices)
 Build a new vector by selecting elements of source at the given indices.
template<typename Tuple, typename Func, std::size_t... Is>
void vulpes::vutils::for_each_impl (Tuple &&tuple, Func &&func, std::index_sequence< Is... >)
template<typename Tuple, typename Func>
void vulpes::vutils::for_each (Tuple &&tuple, Func &&func)
 Apply func to every element of tuple, in order.
template<typename Tuple, typename Func, std::size_t... Is>
void vulpes::vutils::for_each_impl_idxed (Tuple &&tuple, Func &&func, std::index_sequence< Is... >)
template<typename Tuple, typename Func>
void vulpes::vutils::for_each_idxed (Tuple &&tuple, Func &&func)
 Apply func to every element of tuple together with its index.