Provides some commonly useful functions for general containers. More...
Functions | |
| template<typename CONTAINER , typename T > | |
| int | ogdf::searchPos (const CONTAINER &C, const T &x) |
Searches for the position of x in container C; returns -1 if not found. More... | |
Provides some commonly useful functions for general containers.
| int ogdf::searchPos | ( | const CONTAINER & | C, |
| const T & | x | ||
| ) |
Searches for the position of x in container C; returns -1 if not found.
Positions are number 0, 1, 2, ... The function uses the equality operator for comparing elements.
| C | is a container. |
| x | is the element to search for. |
| T | is the type of the elements in C. |
x in C (positions start with 0), or -1 if x is not in C.