diff -r 2d6c8075d9d0 -r 818510fa3d99 doc/graphs.dox --- a/doc/graphs.dox Wed Sep 29 14:12:26 2004 +0000 +++ b/doc/graphs.dox Wed Sep 29 15:30:04 2004 +0000 @@ -2,60 +2,60 @@ \page graphs How to use graphs -The primary data structures of HugoLib are the graph classes. They all +The primary data structures of LEMON are the graph classes. They all provide a node list - edge list interface, i.e. they have functionalities to list the nodes and the edges of the graph as well as in incoming and outgoing edges of a given node. Each graph should meet the -\ref hugo::skeleton::StaticGraph "StaticGraph" concept. +\ref lemon::skeleton::StaticGraph "StaticGraph" concept. This concept does not makes it possible to change the graph (i.e. it is not possible to add or delete edges or nodes). Most of the graph algorithms will run on these graphs. The graphs meeting the -\ref hugo::skeleton::ExtendableGraph "ExtendableGraph" +\ref lemon::skeleton::ExtendableGraph "ExtendableGraph" concept allow node and edge addition. You can also "clear" (i.e. erase all edges and nodes) such a graph. In case of graphs meeting the full feature -\ref hugo::skeleton::ErasableGraph "ErasableGraph" +\ref lemon::skeleton::ErasableGraph "ErasableGraph" concept you can also erase individual edges and node in arbitrary order. The implemented graph structures are the following. -\li \ref hugo::ListGraph "ListGraph" is the most versatile graph class. It meets -the \ref hugo::skeleton::ErasableGraph "ErasableGraph" concept +\li \ref lemon::ListGraph "ListGraph" is the most versatile graph class. It meets +the \ref lemon::skeleton::ErasableGraph "ErasableGraph" concept and it also have some convenience features. -\li \ref hugo::SmartGraph "SmartGraph" is a more memory -efficient version of \ref hugo::ListGraph "ListGraph". The +\li \ref lemon::SmartGraph "SmartGraph" is a more memory +efficient version of \ref lemon::ListGraph "ListGraph". The price of it is that it only meets the -\ref hugo::skeleton::ExtendableGraph "ExtendableGraph" concept, +\ref lemon::skeleton::ExtendableGraph "ExtendableGraph" concept, so you cannot delete individual edges or nodes. -\li \ref hugo::SymListGraph "SymListGraph" and -\ref hugo::SymSmartGraph "SymSmartGraph" classes are very similar to -\ref hugo::ListGraph "ListGraph" and \ref hugo::SmartGraph "SmartGraph". +\li \ref lemon::SymListGraph "SymListGraph" and +\ref lemon::SymSmartGraph "SymSmartGraph" classes are very similar to +\ref lemon::ListGraph "ListGraph" and \ref lemon::SmartGraph "SmartGraph". The difference is that whenever you add a new edge to the graph, it actually adds a pair of oppositely directed edges. They are linked together so it is possible to access the counterpart of an edge. An even more important feature is that using these classes you can also attach data to the edges in such a way that the stored data are shared by the edge pairs. -\li \ref hugo::FullGraph "FullGraph" -implements a full graph. It is a \ref hugo::skeleton::StaticGraph, so you cannot +\li \ref lemon::FullGraph "FullGraph" +implements a full graph. It is a \ref lemon::skeleton::StaticGraph, so you cannot change the number of nodes once it is constructed. It is extremely memory efficient: it uses constant amount of memory independently from the number of the nodes of the graph. Of course, the size of the \ref maps "NodeMap"'s and \ref maps "EdgeMap"'s will depend on the number of nodes. -\li \ref hugo::NodeSet "NodeSet" implements a graph with no edges. This class -can be used as a base class of \ref hugo::EdgeSet "EdgeSet". -\li \ref hugo::EdgeSet "EdgeSet" can be used to create a new graph on +\li \ref lemon::NodeSet "NodeSet" implements a graph with no edges. This class +can be used as a base class of \ref lemon::EdgeSet "EdgeSet". +\li \ref lemon::EdgeSet "EdgeSet" can be used to create a new graph on the node set of another graph. The base graph can be an arbitrary graph and it -is possible to attach several \ref hugo::EdgeSet "EdgeSet"'s to a base graph. +is possible to attach several \ref lemon::EdgeSet "EdgeSet"'s to a base graph. \todo Don't we need SmartNodeSet and SmartEdgeSet? \todo Some cross-refs are wrong. @@ -65,21 +65,21 @@ \ref maps "map classes" to dynamically attach data the to graph components. -The following program demonstrates the basic features of HugoLib's graph +The following program demonstrates the basic features of LEMON's graph structures. \code #include -#include +#include -using namespace hugo; +using namespace lemon; int main() { typedef ListGraph Graph; \endcode -ListGraph is one of HugoLib's graph classes. It is based on linked lists, +ListGraph is one of LEMON's graph classes. It is based on linked lists, therefore iterating throuh its edges and nodes is fast. \code @@ -114,7 +114,7 @@ node iterator to initialize it to the first node. The operator++ is used to step to the next node. Using operator++ on the iterator pointing to the last node invalidates the iterator i.e. sets its value to -\ref hugo::INVALID "INVALID". This is what we exploit in the stop condition. +\ref lemon::INVALID "INVALID". This is what we exploit in the stop condition. The previous code fragment prints out the following: @@ -181,7 +181,7 @@ \endcode As we mentioned above, graphs are not containers rather -incidence structures which are iterable in many ways. HugoLib introduces +incidence structures which are iterable in many ways. LEMON introduces concepts that allow us to attach containers to graphs. These containers are called maps.