|
template<typename ELEMENT , class CONTAINER > |
bool | ts::AppendUnique (CONTAINER &container, const ELEMENT &e) |
| Append an element into a container if not already present in the container. More...
|
|
template<class CONTAINER , class VALUE > |
bool | ts::Contains (const CONTAINER &container, const VALUE &value) |
| Check if a value is present in a container. More...
|
|
template<typename T , class UnaryPredicate > |
bool | ts::EnumerateCombinations (const std::set< T > &values, const std::set< T > &fixed, size_t size, UnaryPredicate predicate) |
| Enumerate all 'k'-elements combinations of a 'n'-elements set. More...
|
|
template<class OSTREAM , class TRAITS = std::char_traits<typename OSTREAM::char_type>> |
std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | ts::IOManipulator (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, OSTREAM &(OSTREAM::*func)()) |
| I/O manipulator for subclasses of std::basic_ostream . More...
|
|
template<class CONTAINER > |
size_t | ts::LargestSize (const CONTAINER &container) |
| Get the size of the largest object in a container of objects having a size() method. More...
|
|
template<class MAP > |
std::list< typename MAP::key_type > | ts::MapKeys (const MAP &container) |
| Get the list of all keys in a map. More...
|
|
template<class MAP > |
std::list< typename MAP::mapped_type > | ts::MapValues (const MAP &container) |
| Get the list of all values in a map. More...
|
|
template<class OSTREAM , class PARAM , class TRAITS = std::char_traits<typename OSTREAM::char_type>> |
std::basic_ostream< typename OSTREAM::char_type, TRAITS > & | operator<< (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, const ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS > &proxy) |
| An overload of operator "<<" on std::basic_ostream for ts::IOManipulatorProxy. More...
|
|
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr> |
std::vector< INT > | ts::Range (INT first, INT last) |
| Build a vector of integers containing all values in a range. More...
|
|
template<class CONTAINER > |
void | ts::RemoveDuplicates (CONTAINER &container) |
| Remove duplicated elements in a container. More...
|
|
template<class CONTAINER > |
size_t | ts::SmallestSize (const CONTAINER &container) |
| Get the size of the smallest object in a container of objects having a size() method. More...
|
|
Miscellaneous C++ algorithms supplementing the standard <algorithm>.
This file declares several template functions implementing general-purpose algorithms. This header may be considered as an extension of the standard header <algorithm>, implementing other algorithms.