Changeset 32:ef12f83752f6 in lemontutorial for graphs.dox
 Timestamp:
 02/15/10 01:51:58 (9 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

graphs.dox
r28 r32 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 200320 095 * Copyright (C) 20032010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 39 39 In LEMON, there are various graph types, which are rather different, but 40 40 they all conform to the corresponding \ref graph_concepts "graph concept", 41 which defines the common part of the graph interfaces. 41 which defines the common part of the graph interfaces. 42 42 The \ref concepts::Digraph "Digraph concept" describes the common interface 43 43 of directed graphs (without any sensible implementation), while … … 51 51 along with some useful basic functions for obtaining the identifiers of 52 52 the items, the end nodes of the arcs (or edges) and their iterators, 53 etc. 53 etc. 54 54 An actual graph implementation may have various additional functionalities 55 55 according to its purpose. … … 67 67 significantly more efficient (both in terms of space and time), but it 68 68 provides less functionality. For example, nodes and arcs cannot be 69 removed from it. 69 removed from it. 70 70 71 71 \ref FullDigraph is an efficient implementation of a directed full graph. … … 82 82 83 83 The \ref concepts::Graph "undirected graphs" also fulfill the concept of 84 \ref concepts::Digraph "directed graphs", in such a way that each 84 \ref concepts::Digraph "directed graphs", in such a way that each 85 85 undirected \e edge of a graph can also be regarded as two oppositely 86 86 directed \e arcs. As a result, all directed graph algorithms automatically … … 99 99 \code 100 100 ListGraph g; 101 101 102 102 ListGraph::Node a = g.addNode(); 103 103 ListGraph::Node b = g.addNode(); … … 134 134 std::cout << "Edge " << g.id(e) << " connects node " 135 135 << g.id(g.u(e)) << " and node " << g.id(g.v(e)) << std::endl; 136 136 137 137 std::cout << "Arc " << g.id(a2) << " goes from node " 138 138 << g.id(g.source(a2)) << " to node " << g.id(g.target(a2)) << std::endl; … … 184 184 std::cout << arc_cost[a1] << ", " << arc_cost[a2] << std::endl; 185 185 \endcode 186 186 187 187 [SEC]sec_special_graphs[SEC] Special Graph Structures 188 188
Note: See TracChangeset
for help on using the changeset viewer.