COIN-OR::LEMON - Graph Library

source: lemon-0.x/doc/maps.dox @ 202:0bd4fe53b1d0

Last change on this file since 202:0bd4fe53b1d0 was 202:0bd4fe53b1d0, checked in by Alpar Juttner, 16 years ago

Documentation page for maps.

File size: 553 bytes
Line 
1/*!
2
3\page maps How to write maps
4
5\section read-maps Readable Maps
6
7It is quite easy to write your own readmap for the edges or nodes of a graph.
8
9You can find some example below.
10
11\code
12class MyMap
13{
14  double get(Graph::EdgeIt e) { return 1;}
15};
16\endcode
17
18A more complex example
19
20\code
21class MyLengthMap
22{
23  const Graph::EdgeMap &ol;
24  const Graph::NodeMap &pot;
25 
26  double get(Graph::EdgeIt e) const { return ol.get(e)-pot.get(v)-pot.get(u);}
27 
28  MyComplexMap(const Graph::EdgeMap &o,const Graph::NodeMap &p) :
29    ol(o), pot(p);
30};
31\endcode
32
33*/
Note: See TracBrowser for help on using the repository browser.