doc/maps1.dox
changeset 2524 44675961f645
parent 2408 467ca6d16556
child 2553 bfced05fa852
equal deleted inserted replaced
2:c8def86878bb 3:869449da046f
    13  * This software is provided "AS IS" with no warranty of any kind,
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    15  * purpose.
    16  *
    16  *
    17  */
    17  */
       
    18 
       
    19 namespace lemon {
    18 
    20 
    19 /**
    21 /**
    20 \page maps1 Maps I.
    22 \page maps1 Maps I.
    21 
    23 
    22 In the previous section we discussed graph topology. That is the skeleton a complex
    24 In the previous section we discussed graph topology. That is the skeleton a complex
    32 \endcode
    34 \endcode
    33 (Except matrix maps, they have two key types.)
    35 (Except matrix maps, they have two key types.)
    34 
    36 
    35 To make easy to use them - especially as template parameters - there are <i>map concepts</i> like by graph classes.
    37 To make easy to use them - especially as template parameters - there are <i>map concepts</i> like by graph classes.
    36 <ul>
    38 <ul>
    37 <li>\ref ReadMap - values can be read out with the \c operator[].
    39 <li>\ref concepts::ReadMap "ReadMap" - values can be read out with the \c operator[].
    38 \code value_typed_variable = map_instance[key_value]; \endcode
    40 \code value_typed_variable = map_instance[key_value]; \endcode
    39 </li>
    41 </li>
    40 <li>\ref WriteMap - values can be set with the \c set() member function.
    42 <li>\ref concepts::WriteMap "WriteMap" - values can be set with the \c set() member function.
    41 \code map_instance.set(key_value, value_typed_expression); \endcode
    43 \code map_instance.set(key_value, value_typed_expression); \endcode
    42 </li>
    44 </li>
    43 <li>\ref ReadWriteMap - it's just a shortcut to indicate that the map is both
    45 <li>\ref concepts::ReadWriteMap "ReadWriteMap" - it's just a shortcut to indicate that the map is both
    44 readable and writable. It is delivered from them.
    46 readable and writable. It is delivered from them.
    45 </li>
    47 </li>
    46 <li>\ref ReferenceMap - a subclass of ReadWriteMap. It has two additional typedefs
    48 <li>\ref concepts::ReferenceMap "ReferenceMap" - a subclass of ReadWriteMap. It has two additional typedefs
    47 <i>Reference</i> and <i>ConstReference</i> and two overloads of \c operator[] to
    49 <i>Reference</i> and <i>ConstReference</i> and two overloads of \c operator[] to
    48 providing you constant or non-constant reference to the value belonging to a key,
    50 providing you constant or non-constant reference to the value belonging to a key,
    49 so you have a direct access to the memory address where it is stored.
    51 so you have a direct access to the memory address where it is stored.
    50 </li>
    52 </li>
    51 <li>And there are the Matrix version of these maps, where the values are assigned to a pair of keys.
    53 <li>And there are the Matrix version of these maps, where the values are assigned to a pair of keys.
    52 The keys can be different types. (\ref ReadMatrixMap, \ref WriteMatrixMap, \ref ReadWriteMatrixMap, \ref ReferenceMatrixMap)
    54 The keys can be different types. (\ref concepts::ReadMatrixMap "ReadMatrixMap", 
       
    55 \ref concepts::WriteMatrixMap "WriteMatrixMap", \ref concepts::ReadWriteMatrixMap "ReadWriteMatrixMap",
       
    56 \ref concepts::ReferenceMatrixMap "ReferenceMatrixMap")
    53 </li>
    57 </li>
    54 </ul>
    58 </ul>
    55 
    59 
    56 \section maps_graph Graphs' maps
    60 \section maps_graph Graphs' maps
    57 Every \ref MappableGraphComponent "mappable" graph class has two public templates: NodeMap<VALUE> and EdgeMap<VALUE>
    61 Every \ref MappableGraphComponent "mappable" graph class has two public templates: NodeMap<VALUE> and EdgeMap<VALUE>
    86 
    90 
    87 If you want some 'real-life' examples see the next page, where we discuss \ref algorithms
    91 If you want some 'real-life' examples see the next page, where we discuss \ref algorithms
    88 (coming soon) and will use maps hardly.
    92 (coming soon) and will use maps hardly.
    89 Or if you want to know more about maps read these \ref maps2 "advanced map techniques".
    93 Or if you want to know more about maps read these \ref maps2 "advanced map techniques".
    90 */
    94 */
       
    95 
       
    96 }