|
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.
|
|
template<class CONTAINER , class VALUE > |
bool | ts::Contains (const CONTAINER &container, const VALUE &value) |
| Check if a value is present in a container.
|
|
template<class VALUE > |
bool | ts::Contains (const std::vector< VALUE > &container, const VALUE &value) |
| Check if a value is present in a vector container.
|
|
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.
|
|
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 .
|
|
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.
|
|
template<class MAP > |
std::list< typename MAP::key_type > | ts::MapKeysList (const MAP &container) |
| Get the list of all keys in a map.
|
|
template<class MAP > |
std::set< typename MAP::key_type > | ts::MapKeysSet (const MAP &container) |
| Get the set of all keys in a map.
|
|
template<class MAP > |
std::list< typename MAP::mapped_type > | ts::MapValuesList (const MAP &container) |
| Get the list of all values in a map.
|
|
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.
|
|
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.
|
|
template<class CONTAINER > |
void | ts::RemoveDuplicates (CONTAINER &container) |
| Remove duplicated elements in a container.
|
|
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.
|
|
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.