# Changeset 50:72867897fcba in lemon-tutorial

Ignore:
Timestamp:
02/22/10 13:00:14 (11 years ago)
Branch:
default
Phase:
public
Message:

Minor improvements

Files:
4 edited

Unmodified
Removed
• ## algorithms.dox

 r49 \code Dijkstra dijktra(g, length); Dijkstra dijkstra(g, length); dijkstra.distMap(dist); dijsktra.init();
• ## graphs.dox

 r46 SmartDigraph, especially using \ref concepts::Digraph::OutArcIt "OutArcIt" iterators, since its arcs are stored in an appropriate order. However, it only provides \ref StaticDigraph::build() "build()" and \ref \ref StaticDigraph::clear() "clear()" functions and does not support any other modification of the digraph. However, you can neither add nor delete arcs or nodes, the graph has to be built at once and other modifications are not supported. \ref FullDigraph is an efficient implementation of a directed full graph. This structure is also completely static, so you can neither add nor delete arcs or nodes, moreover, the class needs constant space in memory. This structure is also completely static and it needs constant space in memory. The general undirected graph classes, \ref ListGraph and \ref SmartGraph have similar implementations as their directed variants. Therefore, \ref SmartDigraph is more efficient, but \ref ListGraph provides Therefore, \ref SmartGraph is more efficient, but \ref ListGraph provides more functionality. In addition to these general structures, LEMON also provides special purpose undirected graph types for handling \ref FullGraph "full graphs", \ref GridGraph "grid graphs" and \ref HypercubeGraph "hypercube graphs". They all static structures, i.e. they do not allow distinct item additions or deletions, the graph has to be built at once. [TRAILER]
• ## lp.dox

 r48 lp.solve(); cout << "Objective function value: " << lp.primal() << endl; cout << "x1 = " << lp.primal(x1) << endl; cout << "x2 = " << lp.primal(x2) << endl; std::cout << "Objective function value: " << lp.primal() << std::endl; std::cout << "x1 = " << lp.primal(x1) << std::endl; std::cout << "x2 = " << lp.primal(x2) << std::endl; \endcode lp.obj(o); lp.solve(); std::cout << "Max flow value: " << lp.primal() << std::endl; \endcode
• ## undir_graphs.dox

 r47 [SEC]sec_undir_graph_algs[SEC] Undirected Graph Algorihtms \todo This subsection is under construction. If you would like to design an electric network minimizing the total length of wires, then you might be looking for a minimum spanning tree in an Let us suppose that the network is stored in a \ref ListGraph object \c g with a cost map \c cost. We create a \c bool valued edge map \c tree_map or a vector \c tree_vector for stroing the tree that is found by the algorithm. a vector \c tree_vector for storing the tree that is found by the algorithm. After that, we could call the \ref kruskal() function. It gives back the weight of the minimum spanning tree and \c tree_map or \c tree_vector std::vector tree_vector; std::cout << "The weight of the minimum spanning tree is " << kruskal(g, cost_map, tree_vector) << std::endl; << kruskal(g, cost_map, std::back_inserter(tree_vector)) << std::endl; // Print the results
Note: See TracChangeset for help on using the changeset viewer.