doc/maps.dox
changeset 925 766eb8c9e3ab
parent 697 89d97db9c927
child 927 dec4eef5a65c
equal deleted inserted replaced
9:2a22a6207f53 10:e36eda8d6cb8
     2 
     2 
     3 
     3 
     4 
     4 
     5 \page maps Maps
     5 \page maps Maps
     6 
     6 
     7 Maps play central role in HUGOlib. As their name suggests, they map a
     7 Maps play central role in LEMON. As their name suggests, they map a
     8 certain range of \e keys to certain \e values. Each map has two
     8 certain range of \e keys to certain \e values. Each map has two
     9 <tt>typedef</tt>'s to determine the types of keys and values, like this:
     9 <tt>typedef</tt>'s to determine the types of keys and values, like this:
    10 
    10 
    11 \code
    11 \code
    12   typedef Edge KeyType;
    12   typedef Edge KeyType;
    19 read and write the values of a key, a reference map
    19 read and write the values of a key, a reference map
    20 can also give you a reference to the
    20 can also give you a reference to the
    21 value belonging to a key, so you have a direct access to the memory address
    21 value belonging to a key, so you have a direct access to the memory address
    22 where it is stored.
    22 where it is stored.
    23 
    23 
    24 Each graph structure in HUGOlib provides two standard map templates called
    24 Each graph structure in LEMON provides two standard map templates called
    25 \c EdgeMap and \c NodeMap. Both are reference maps and you can easily
    25 \c EdgeMap and \c NodeMap. Both are reference maps and you can easily
    26 assign data to the nodes and to the edges of the graph. For example if you
    26 assign data to the nodes and to the edges of the graph. For example if you
    27 have a graph \c G defined as
    27 have a graph \c G defined as
    28 \code
    28 \code
    29   ListGraph G;
    29   ListGraph G;
    67 
    67 
    68 \subsection read-maps Readable Maps
    68 \subsection read-maps Readable Maps
    69 
    69 
    70 The readable maps are very frequently used as the input of the
    70 The readable maps are very frequently used as the input of the
    71 algorithms.  For this purpose the most straightforward way is the use of the
    71 algorithms.  For this purpose the most straightforward way is the use of the
    72 default maps provided by Hugo's graph structures.
    72 default maps provided by LEMON's graph structures.
    73 Very often however, it is more
    73 Very often however, it is more
    74 convenient and/or more efficient to write your own readable map.
    74 convenient and/or more efficient to write your own readable map.
    75 
    75 
    76 You can find some examples below. In these examples \c Graph is the
    76 You can find some examples below. In these examples \c Graph is the
    77 type of the particular graph structure you use.
    77 type of the particular graph structure you use.