Changeset 1788:614ce2dd3cba in lemon-0.x for doc
- Timestamp:
- 11/14/05 19:34:16 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2329
- Location:
- doc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/coding_style.dox
r1083 r1788 78 78 \endcode 79 79 80 or 81 82 \code 83 ClassNameEndsWithError 84 \endcode 85 80 86 \section header-template Template Header File 81 87 -
doc/graph_io.dox
r1631 r1788 111 111 \section use Using graph input-output 112 112 113 The easiest way of using graph input and output is using the versions of the114 public \ref readGraph() and \ref writeGraph() functions; if you don't need115 very sophisticated behaviour then you might be satisfied with116 those. Otherwise go on reading this page.117 113 118 114 The graph input and output is based on <em> reading and writing … … 362 358 and \ref lemon::UndirGraphWriter "UndirGraphWriter". 363 359 364 The \ref lemon::UndirGraphReader::readUndir Map() "readUndirMap()"360 The \ref lemon::UndirGraphReader::readUndirEdgeMap() "readUndirEdgeMap()" 365 361 function reads an undirected map and the 366 362 \ref lemon::UndirGraphReader::readUndirEdge() "readUndirEdge()" -
doc/maps.dox
r1183 r1788 28 28 \c EdgeMap and \c NodeMap. Both are reference maps and you can easily 29 29 assign data to the nodes and to the edges of the graph. For example if you 30 have a graph \c Gdefined as30 have a graph \c g defined as 31 31 \code 32 ListGraph G;32 ListGraph g; 33 33 \endcode 34 34 and you want to assign a floating point value to each edge, you can do 35 35 it like this. 36 36 \code 37 ListGraph::EdgeMap<double> length( G);37 ListGraph::EdgeMap<double> length(g); 38 38 \endcode 39 39 Note that you must give the underlying graph to the constructor. … … 95 95 An alternative way to define maps is to use \c MapBase 96 96 97 \todo For this, \c MapBase seems to be a better name then \c NullMap.98 99 97 \code 100 98 struct MyMap : public MapBase<Graph::Edge,double> … … 117 115 public: 118 116 Value operator[](Key e) const { 119 return orig_len .get(e)-(pot.get(G.target(e))-pot.get(G.source(e)));117 return orig_len[e]-(pot[g.target(e)]-pot[g.source(e)]); 120 118 } 121 119 122 120 ReducedLengthMap(const Graph &_g, 123 const Graph::EdgeMap & o,124 const Graph::NodeMap & p)125 : G(g), orig_len(o), pot(p) {};121 const Graph::EdgeMap &_o, 122 const Graph::NodeMap &_p) 123 : g(_g), orig_len(_o), pot(_p) {}; 126 124 }; 127 125 \endcode
Note: See TracChangeset
for help on using the changeset viewer.