COIN-OR::LEMON - Graph Library

Changeset 83:3654324ec035 in lemon-1.2 for doc/groups.dox


Ignore:
Timestamp:
03/15/08 23:42:33 (17 years ago)
Author:
Peter Kovacs <kpeter@…>
Branch:
default
Phase:
public
Message:

Improvements in groups.dox

  • Apply the graph renamings.
  • Apply the current map renamings.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/groups.dox

    r71 r83  
    3939the diverging requirements of the possible users.  In order to save on
    4040running time or on memory usage, some structures may fail to provide
    41 some graph features like edge or node deletion.
     41some graph features like arc/edge or node deletion.
    4242
    4343Alteration of standard containers need a very limited number of
     
    4545In the case of graph structures, different operations are needed which do
    4646not alter the physical graph, but gives another view. If some nodes or
    47 edges have to be hidden or the reverse oriented graph have to be used, then
     47arcs have to be hidden or the reverse oriented graph have to be used, then
    4848this is the case. It also may happen that in a flow implementation
    4949the residual graph can be accessed by another algorithm, or a node-set
     
    8282@defgroup graph_maps Graph Maps
    8383@ingroup maps
    84 \brief Special Graph-Related Maps.
     84\brief Special graph-related maps.
    8585
    8686This group describes maps that are specifically designed to assign
    87 values to the nodes and edges of graphs.
     87values to the nodes and arcs of graphs.
    8888*/
    8989
     
    9797maps from other maps.
    9898
    99 Most of them are \ref lemon::concepts::ReadMap "ReadMap"s. They can
    100 make arithmetic operations between one or two maps (negation, scaling,
    101 addition, multiplication etc.) or e.g. convert a map to another one
    102 of different Value type.
     99Most of them are \ref lemon::concepts::ReadMap "read-only maps".
     100They can make arithmetic and logical operations between one or two maps
     101(negation, shifting, addition, multiplication, logical 'and', 'or',
     102'not' etc.) or e.g. convert a map to another one of different Value type.
    103103
    104104The typical usage of this classes is passing implicit maps to
    105105algorithms.  If a function type algorithm is called then the function
    106106type map adaptors can be used comfortable. For example let's see the
    107 usage of map adaptors with the \c graphToEps() function:
     107usage of map adaptors with the \c digraphToEps() function.
    108108\code
    109109  Color nodeColor(int deg) {
     
    117117  }
    118118 
    119   Graph::NodeMap<int> degree_map(graph);
     119  Digraph::NodeMap<int> degree_map(graph);
    120120 
    121   graphToEps(graph, "graph.eps")
     121  digraphToEps(graph, "graph.eps")
    122122    .coords(coords).scaleToA4().undirected()
    123     .nodeColors(composeMap(functorMap(nodeColor), degree_map))
     123    .nodeColors(composeMap(functorToMap(nodeColor), degree_map))
    124124    .run();
    125125\endcode
    126 The \c functorMap() function makes an \c int to \c Color map from the
     126The \c functorToMap() function makes an \c int to \c Color map from the
    127127\e nodeColor() function. The \c composeMap() compose the \e degree_map
    128 and the previous created map. The composed map is proper function to
    129 get color of each node.
     128and the previously created map. The composed map is a proper function to
     129get the color of each node.
    130130
    131131The usage with class type algorithms is little bit harder. In this
     
    133133function map adaptors give back temporary objects.
    134134\code
    135   Graph graph;
    136  
    137   typedef Graph::EdgeMap<double> DoubleEdgeMap;
    138   DoubleEdgeMap length(graph);
    139   DoubleEdgeMap speed(graph);
    140  
    141   typedef DivMap<DoubleEdgeMap, DoubleEdgeMap> TimeMap;
    142  
     135  Digraph graph;
     136
     137  typedef Digraph::ArcMap<double> DoubleArcMap;
     138  DoubleArcMap length(graph);
     139  DoubleArcMap speed(graph);
     140
     141  typedef DivMap<DoubleArcMap, DoubleArcMap> TimeMap;
    143142  TimeMap time(length, speed);
    144143 
    145   Dijkstra<Graph, TimeMap> dijkstra(graph, time);
     144  Dijkstra<Digraph, TimeMap> dijkstra(graph, time);
    146145  dijkstra.run(source, target);
    147146\endcode
    148 
    149 We have a length map and a maximum speed map on a graph. The minimum
    150 time to pass the edge can be calculated as the division of the two
    151 maps which can be done implicitly with the \c DivMap template
     147We have a length map and a maximum speed map on the arcs of a digraph.
     148The minimum time to pass the arc can be calculated as the division of
     149the two maps which can be done implicitly with the \c DivMap template
    152150class. We use the implicit minimum time map as the length map of the
    153151\c Dijkstra algorithm.
     
    316314This group contains algorithm objects and functions to calculate
    317315matchings in graphs and bipartite graphs. The general matching problem is
    318 finding a subset of the edges which does not shares common endpoints.
     316finding a subset of the arcs which does not shares common endpoints.
    319317 
    320318There are several different algorithms for calculate matchings in
Note: See TracChangeset for help on using the changeset viewer.