Implementation of algorithms as templates working with different list types. More...
#include <ogdf/basic/Array.h>
#include <ogdf/basic/basic.h>
#include <ogdf/basic/comparer.h>
#include <functional>
Go to the source code of this file.
Namespaces | |
ogdf | |
The namespace for all OGDF objects. | |
ogdf::internal | |
Functions | |
template<typename CONTAINER , typename TYPE , typename ITERATOR > | |
ITERATOR | ogdf::internal::chooseIteratorByFastTest (CONTAINER &container, std::function< bool(const TYPE &)> includeElement) |
template<typename CONTAINER , typename TYPE , typename ITERATOR > | |
ITERATOR | ogdf::internal::chooseIteratorBySlowTest (CONTAINER &container, std::function< bool(const TYPE &)> includeElement, int size) |
template<typename CONTAINER , typename TYPE > | |
CONTAINER::const_iterator | ogdf::chooseIteratorFrom (const CONTAINER &container, std::function< bool(const TYPE &)> includeElement=[](const TYPE &) { return true;}, bool isFastTest=true) |
Returns an iterator to a random element in the container . More... | |
template<typename CONTAINER , typename TYPE , typename ITERATOR > | |
ITERATOR | ogdf::internal::chooseIteratorFrom (CONTAINER &container, std::function< bool(const TYPE &)> includeElement, bool isFastTest) |
Returns an iterator to a random element in the container . More... | |
template<typename CONTAINER , typename TYPE > | |
CONTAINER::iterator | ogdf::chooseIteratorFrom (CONTAINER &container, std::function< bool(const TYPE &)> includeElement=[](const TYPE &) { return true;}, bool isFastTest=true) |
Returns an iterator to a random element in the container . More... | |
template<class LIST > | |
void | ogdf::quicksortTemplate (LIST &L) |
template<class LIST , class COMPARER > | |
void | ogdf::quicksortTemplate (LIST &L, const COMPARER &comp) |
template<typename CONTAINER > | |
void | ogdf::safeForEach (CONTAINER &container, std::function< void(typename CONTAINER::value_type)> func) |
Calls (possibly destructive) func for each element of container . More... | |
template<typename CONTAINER > | |
bool | ogdf::safeTestForEach (CONTAINER &container, std::function< bool(typename CONTAINER::value_type)> func) |
Like ogdf::safeForEach() but aborts if func returns false . More... | |
Implementation of algorithms as templates working with different list types.
Definition in file list_templates.h.