Vector and array helpers. More...
Include dependency graph for vectors.h:
This graph shows which files directly or indirectly include this file:Namespaces | |
| namespace | std |
| STL namespace. | |
| namespace | syten |
| Syten namespace. | |
Functions | |
| template<typename Container > | |
| void | syten::addLog (Container &c) |
Adds values contained in c into c[0]. More... | |
| template<typename Container , typename Function > | |
| void | syten::addLog (Container &c, Function &&f, std::size_t threshold=2, std::size_t avail_threads=1) |
Adds values contained in c into c[0], applying f whenever more than threshold terms have been summed. More... | |
| template<typename Iterator > | |
| void | syten::addLog (Iterator first, Iterator end) |
Adds values in the range [first, end) using operator+=, the result is found in *first. More... | |
| template<typename Iterator , typename Function > | |
| void | syten::addLog (Iterator first, Iterator end, Function &&f, std::size_t threshold=2, std::size_t avail_threads=1) |
Adds values in the range [first, end) using operator+=, the result is found in *first. More... | |
| std::array< Type, rank-1 > ::type | syten::dropDummy (std::array< Type, rank > const &a, std::size_t position) |
Copies a dropping the element at 1-indexed position position. More... | |
| template<typename T , std::size_t rank> | |
| bool | syten::equalArrayInitList (std::array< T, rank > const &a, std::array< T, rank > const &b) |
| Compares two arrays, i.e. More... | |
| template<typename T , std::size_t rank> | |
| bool | syten::hasMember (std::array< T, rank > const &v, T const &e) |
| Returns true if the array has an element comparing equal to the second argument. More... | |
| template<typename T > | |
| bool | syten::hasMember (std::vector< T > const &v, T const &e) |
| Returns true if the vector has an element comparing equal to the second argument. More... | |
| template<typename Type , std::size_t rank> | |
| std::array< Type, rank+1 > | syten::insertDummy (std::array< Type, rank > const &a, std::size_t position, typename IdentityType< Type >::type val) |
Copies a with val at 1-indexed position position. More... | |
| template<typename U , std::size_t rank> | |
| std::vector< std::vector< U > > | syten::kronVector (std::vector< std::array< U, rank > > const &v, std::vector< U > const &c) |
| Kronecker product of a vector of rank-arrays and a vector. More... | |
| template<typename U > | |
| std::vector< std::vector< U > > | syten::kronVector (std::vector< std::vector< U > > const &v, std::vector< U > const &c) |
| Kronecker product of a vector of N-vectors and a vector. More... | |
| template<typename U > | |
| std::vector< std::vector< U > > | syten::kronVector (std::vector< U > const &a, std::vector< U > const &b) |
| Kronecker product of two vectors. More... | |
| template<typename I , typename F > | |
| auto | syten::mapVector (std::vector< I > const &a, F f) |
| Maps a unary function over one vector. More... | |
| template<typename T , typename U , typename F > | |
| auto | syten::mapVector (std::vector< T > const &a, std::vector< U > const &b, F f) |
| Maps a binary function over two vectors. More... | |
| template<typename T , std::size_t rank> | |
| std::array< T, rank > | std::operator+ (std::array< T, rank > const &a, std::array< T, rank > const &b) |
| Adds two arrays element-wise. More... | |
| std::vector< std::string > | syten::split (std::string const &in, std::string const &splitter) |
| Splits a string into substrings at every occurence of 'splitter'. More... | |
| std::vector< std::string > | syten::split (std::string_view const in, std::string const &splitter) |
| Splits a string into substrings at every occurence of 'splitter'. More... | |
| template<typename Type , std::size_t rank> | |
| Type | syten::sumProd (std::array< Type, rank > const &a, std::array< Type, rank > const &b) |
| Scalar product between two arrays, could potentially be replaced by std::inner_prod. More... | |
Vector and array helpers.