equal
deleted
inserted
replaced
36 First we show how to add nodes and edges to a graph manually. We will also |
36 First we show how to add nodes and edges to a graph manually. We will also |
37 define a map on the edges of the graph. After this we show the way one can |
37 define a map on the edges of the graph. After this we show the way one can |
38 read a graph (and perhaps maps on it) from a stream (e.g. a file). Of course |
38 read a graph (and perhaps maps on it) from a stream (e.g. a file). Of course |
39 we also have routines that write a graph (and perhaps maps) to a stream |
39 we also have routines that write a graph (and perhaps maps) to a stream |
40 (file): this will also be shown. LEMON supports the DIMACS file formats to |
40 (file): this will also be shown. LEMON supports the DIMACS file formats to |
41 store network optimization problems, but more importantly we also have our own |
41 read network optimization problems, but more importantly we also have our own |
42 file format that gives a more flexible way to store data related to network |
42 file format that gives a more flexible way to store data related to network |
43 optimization. |
43 optimization. |
44 |
44 |
45 <ol> <li>The following code shows how to build a graph from scratch |
45 <ol> <li>The following code shows how to build a graph from scratch |
46 and iterate on its nodes and edges. This example also shows how to |
46 and iterate on its nodes and edges. This example also shows how to |
84 readDimacs(f, g); |
84 readDimacs(f, g); |
85 \endcode |
85 \endcode |
86 |
86 |
87 One can also store network (graph+capacity on the edges) instances and |
87 One can also store network (graph+capacity on the edges) instances and |
88 other things (minimum cost flow instances etc.) in DIMACS format and |
88 other things (minimum cost flow instances etc.) in DIMACS format and |
89 use these in LEMON: to see the details read the documentation of the |
89 read these in LEMON: to see the details read the documentation of the |
90 \ref dimacs.h "Dimacs file format reader". There you will also find |
90 \ref dimacs.h "Dimacs file format reader". |
91 the details about the output routines into files of the DIMACS format. |
|
92 |
91 |
93 </ol> |
92 </ol> |
94 <li> If you want to solve some transportation problems in a network then |
93 <li> If you want to solve some transportation problems in a network then |
95 you will want to find shortest paths between nodes of a graph. This is |
94 you will want to find shortest paths between nodes of a graph. This is |
96 usually solved using Dijkstra's algorithm. A utility |
95 usually solved using Dijkstra's algorithm. A utility |