Provides some commonly useful functions for general containers.
More...
Provides some commonly useful functions for general containers.
◆ reverse()
Reverse< T > ogdf::reverse |
( |
T & |
container | ) |
|
Provides iterators for container
to make it easily iterable in reverse.
Reverse< T > reverse(T &container)
Provides iterators for container to make it easily iterable in reverse.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
- Template Parameters
-
T | denotes the type of container . |
- Parameters
-
container | is the container to be reversed. |
Definition at line 74 of file Reverse.h.
◆ searchPos()
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.
- Parameters
-
C | is a container. |
x | is the element to search for. |
- Template Parameters
-
T | is the type of the elements in C . |
- Returns
- the position of the first occurrence of
x
in C
(positions start with 0), or -1 if x
is not in C
.
Definition at line 220 of file basic.h.