Changeset 921:818510fa3d99 in lemon0.x for doc/graphs.dox
 Timestamp:
 09/29/04 17:30:04 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1232
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

doc/graphs.dox
r911 r921 3 3 \page graphs How to use graphs 4 4 5 The primary data structures of HugoLibare the graph classes. They all5 The primary data structures of LEMON are the graph classes. They all 6 6 provide a node list  edge list interface, i.e. they have 7 7 functionalities to list the nodes and the edges of the graph as well … … 10 10 11 11 Each graph should meet the 12 \ref hugo::skeleton::StaticGraph "StaticGraph" concept.12 \ref lemon::skeleton::StaticGraph "StaticGraph" concept. 13 13 This concept does not 14 14 makes it possible to change the graph (i.e. it is not possible to add … … 17 17 18 18 The graphs meeting the 19 \ref hugo::skeleton::ExtendableGraph "ExtendableGraph"19 \ref lemon::skeleton::ExtendableGraph "ExtendableGraph" 20 20 concept allow node and 21 21 edge addition. You can also "clear" (i.e. erase all edges and nodes) … … 23 23 24 24 In case of graphs meeting the full feature 25 \ref hugo::skeleton::ErasableGraph "ErasableGraph"25 \ref lemon::skeleton::ErasableGraph "ErasableGraph" 26 26 concept 27 27 you can also erase individual edges and node in arbitrary order. 28 28 29 29 The implemented graph structures are the following. 30 \li \ref hugo::ListGraph "ListGraph" is the most versatile graph class. It meets31 the \ref hugo::skeleton::ErasableGraph "ErasableGraph" concept30 \li \ref lemon::ListGraph "ListGraph" is the most versatile graph class. It meets 31 the \ref lemon::skeleton::ErasableGraph "ErasableGraph" concept 32 32 and it also have some convenience features. 33 \li \ref hugo::SmartGraph "SmartGraph" is a more memory34 efficient version of \ref hugo::ListGraph "ListGraph". The33 \li \ref lemon::SmartGraph "SmartGraph" is a more memory 34 efficient version of \ref lemon::ListGraph "ListGraph". The 35 35 price of it is that it only meets the 36 \ref hugo::skeleton::ExtendableGraph "ExtendableGraph" concept,36 \ref lemon::skeleton::ExtendableGraph "ExtendableGraph" concept, 37 37 so you cannot delete individual edges or nodes. 38 \li \ref hugo::SymListGraph "SymListGraph" and39 \ref hugo::SymSmartGraph "SymSmartGraph" classes are very similar to40 \ref hugo::ListGraph "ListGraph" and \ref hugo::SmartGraph "SmartGraph".38 \li \ref lemon::SymListGraph "SymListGraph" and 39 \ref lemon::SymSmartGraph "SymSmartGraph" classes are very similar to 40 \ref lemon::ListGraph "ListGraph" and \ref lemon::SmartGraph "SmartGraph". 41 41 The difference is that whenever you add a 42 42 new edge to the graph, it actually adds a pair of oppositely directed edges. … … 45 45 attach data to the edges in such a way that the stored data 46 46 are shared by the edge pairs. 47 \li \ref hugo::FullGraph "FullGraph"48 implements a full graph. It is a \ref hugo::skeleton::StaticGraph, so you cannot47 \li \ref lemon::FullGraph "FullGraph" 48 implements a full graph. It is a \ref lemon::skeleton::StaticGraph, so you cannot 49 49 change the number of nodes once it is constructed. It is extremely memory 50 50 efficient: it uses constant amount of memory independently from the number of … … 52 52 \ref maps "EdgeMap"'s will depend on the number of nodes. 53 53 54 \li \ref hugo::NodeSet "NodeSet" implements a graph with no edges. This class55 can be used as a base class of \ref hugo::EdgeSet "EdgeSet".56 \li \ref hugo::EdgeSet "EdgeSet" can be used to create a new graph on54 \li \ref lemon::NodeSet "NodeSet" implements a graph with no edges. This class 55 can be used as a base class of \ref lemon::EdgeSet "EdgeSet". 56 \li \ref lemon::EdgeSet "EdgeSet" can be used to create a new graph on 57 57 the node set of another graph. The base graph can be an arbitrary graph and it 58 is possible to attach several \ref hugo::EdgeSet "EdgeSet"'s to a base graph.58 is possible to attach several \ref lemon::EdgeSet "EdgeSet"'s to a base graph. 59 59 60 60 \todo Don't we need SmartNodeSet and SmartEdgeSet? … … 66 66 to dynamically attach data the to graph components. 67 67 68 The following program demonstrates the basic features of HugoLib's graph68 The following program demonstrates the basic features of LEMON's graph 69 69 structures. 70 70 71 71 \code 72 72 #include <iostream> 73 #include < hugo/list_graph.h>73 #include <lemon/list_graph.h> 74 74 75 using namespace hugo;75 using namespace lemon; 76 76 77 77 int main() … … 80 80 \endcode 81 81 82 ListGraph is one of HugoLib's graph classes. It is based on linked lists,82 ListGraph is one of LEMON's graph classes. It is based on linked lists, 83 83 therefore iterating throuh its edges and nodes is fast. 84 84 … … 115 115 step to the next node. Using operator++ on the iterator pointing to the last 116 116 node invalidates the iterator i.e. sets its value to 117 \ref hugo::INVALID "INVALID". This is what we exploit in the stop condition.117 \ref lemon::INVALID "INVALID". This is what we exploit in the stop condition. 118 118 119 119 The previous code fragment prints out the following: … … 182 182 183 183 As we mentioned above, graphs are not containers rather 184 incidence structures which are iterable in many ways. HugoLibintroduces184 incidence structures which are iterable in many ways. LEMON introduces 185 185 concepts that allow us to attach containers to graphs. These containers are 186 186 called maps.
Note: See TracChangeset
for help on using the changeset viewer.