AutoPas  3.0.0
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
ArrayUtils.h File Reference
#include <array>
#include <iomanip>
#include <numeric>
#include <set>
#include <sstream>
#include <vector>
Include dependency graph for ArrayUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  autopas::utils::ArrayUtils::is_container_impl::is_container< T >
 Default case: T is not a container. More...
 
struct  autopas::utils::ArrayUtils::is_container_impl::is_container< std::array< T, N > >
 Specialization to allow std::array. More...
 
struct  autopas::utils::ArrayUtils::is_container_impl::is_container< std::vector< Args... > >
 Specialization to allow std::vector. More...
 
struct  autopas::utils::ArrayUtils::is_container_impl::is_container< std::set< Args... > >
 Specialization to allow std::vector. More...
 
struct  autopas::utils::ArrayUtils::is_container< T >
 

Namespaces

namespace  autopas
 This is the main namespace of AutoPas.
 
namespace  autopas::utils
 In this namespace some helper classes and functions can be found used inside of AutoPas.
 
namespace  autopas::utils::ArrayUtils
 In this namespace some helper functions for std::array can be found.
 
namespace  autopas::utils::ArrayUtils::is_container_impl
 Collection of structs that define what we consider a container.
 

Functions

template<class output_t , class input_t , std::size_t SIZE>
constexpr std::array< output_t, SIZE > autopas::utils::ArrayUtils::static_cast_copy_array (const std::array< input_t, SIZE > &a)
 Creates a new array by performing an element-wise static_cast<>.
 
template<class Container , class Fun >
void autopas::utils::ArrayUtils::to_string (std::ostream &os, const Container &container, const std::string &delimiter, const std::array< std::string, 2 > &surround, Fun elemToString)
 Generates a string representation of a container which fulfills the Container requirement (provide cbegin and cend) and appends it to a stream.
 
template<class Container >
void autopas::utils::ArrayUtils::to_string (std::ostream &os, const Container &container, const std::string &delimiter=", ", const std::array< std::string, 2 > &surround={"[", "]"})
 Version of to_string() with simpler signature and default arguments.
 
template<class Container , class Fun >
std::string autopas::utils::ArrayUtils::to_string (const Container &container, const std::string &delimiter, const std::array< std::string, 2 > &surround, Fun elemToString)
 Generates a string representation of a container which fulfills the Container requirement (provide cbegin and cend).
 
template<class Container >
std::string autopas::utils::ArrayUtils::to_string (const Container &container, const std::string &delimiter=", ", const std::array< std::string, 2 > &surround={"[", "]"})
 Version of to_string() with simpler signature and default arguments.
 
template<class Container >
std::enable_if_t< autopas::utils::ArrayUtils::is_container< Container >::value, std::ostream & > autopas::utils::ArrayUtils::operator<< (std::ostream &os, const Container &container)
 Stream operator for containers (array and vector types).
 
template<class OuterContainerT >
void autopas::utils::ArrayUtils::balanceVectors (OuterContainerT &vecvec)
 Given a collection of vectors, redistributes the elements of the vectors so they all have the same (or +1) size.
 
template<class OuterContainerT , class F >
void autopas::utils::ArrayUtils::balanceVectors (OuterContainerT &vecvec, F innerContainerToVec)
 Given a collection of containers that hold vectors, redistributes the elements of the vectors so they all have the same (or +1) size.
 

Detailed Description

Date
11.07.2019.
Author
C.Menges