\manpage {edge\_map} {E} {Edge Maps} 
 
\definition
an instance of the data type \name\ is a map for the edges of a graph
$G$, i.e., equivalent to $map\<edge,E\>$ (cf. \ref{Maps}). It can be
used as a dynamic variant of the data type $edge\_array$
(cf. \ref{Edge Arrays}). 
 
\creation M 
 
\create { }
   { introduces a variable \var\ of type \name\ and initializes
             it to the map with empty domain.  }
 
 
\create {(graph\ G)}
   { introduces a variable \var\ of type \name\ and initializes
             it with a mapping $m$ from the set of all edges 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$.  }
 
 
\create {(graph\ G,\ E\ x)}
   { introduces a variable \var\ of type \name\ and initializes
             it with a mapping $m$ from the set of all edges 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 1.3 4.3 
 
\op  void init {()}
           {  makes \var\ a edge map with empty domain.  }
 
 
\op  void init {( graph\ G)}
           {  makes \var\ to a mapping $m$ from the set of all edges 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$.  }
 
 
\op  void init {( graph\ G, \ E\ x)}
           {  makes \var\ to a mapping $m$ from the set of all edges of $G$
              into the set of variables of type $E$. The variables in the 
              range of $m$ are initialized with a copy of $x$.  }
 
 
\arrop E\&  {edge\ e}
         {  returns the variable $M(e)$.  }
 
 
\implementation
Edge maps are implemented by an efficient hashing method based on the 
internal numbering of the edges. An access operation takes expected 
time $O(1)$. 

 
