Definition
An instance of the data type face_map<E> is a map for the faces of a graph G, i.e., equivalent to map<face,E> (cf. Maps). It can be used as a dynamic variant of the data type face_array (cf. Face Arrays). New: Since face_map<E> is derived from face_array<E> face maps can be passed (by reference) to functions with face array parameters. In particular, all LEDA graph algorithms expecting a face_array<E>& argument can be passed a face_map<E> instead.
#include < LEDA/graph/face_map.h >
Creation
face_map<E> | M | introduces a variable M of type face_map<E> and initializes it to the map with empty domain. |
face_map<E> | M(const graph_t& G) | introduces a variable M of type face_map<E> and initializes it with a mapping m from the set of all faces of G into the set of variables of type E. The variables in the range of m are initialized by a call of the default constructor of type E. |
face_map<E> | M(const graph_t& G, E x) | introduces a variable M of type face_map<E> and initializes it with a mapping m from the set of all faces of G into the set of variables of type E. The variables in the range of m are initialized with a copy of x. |
Operations
Implementation
Face maps are implemented by an efficient hashing method based on the internal numbering of the faces. An access operation takes expected time O(1).