# HG changeset patch # User alpar # Date 1095362621 0 # Node ID f3a30fda2e49d8f4d636544f416b9f37d194d990 # Parent c010b38ea35bbe0a2a85651859f9ea30332cc14b - GraphSkeleton renamed to ExtendableGraphSkeleton - Use full explicit namespaces in some places in order to work with icc. (I don't know why they are necessary.) diff -r c010b38ea35b -r f3a30fda2e49 doc/graphs.dox --- a/doc/graphs.dox Thu Sep 16 19:18:18 2004 +0000 +++ b/doc/graphs.dox Thu Sep 16 19:23:41 2004 +0000 @@ -8,24 +8,32 @@ as in incoming and outgoing edges of a given node. -Each graph should meet the \ref ConstGraph concept. This concept does +Each graph should meet the +\ref hugo::skeleton::StaticGraphSkeleton "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 ExtendableGraph concept allow node and +The graphs meeting the +\ref hugo::skeleton::ExtendableGraphSkeleton "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 ErasableGraph concept +In case of graphs meeting the full feature +\ref hugo::skeleton::ErasableGraphSkeleton "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 ErasableGraph concept and it also have some convenience features. +the hugo::skeleton::ErasableGraphSkeleton "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 -price of it is that it only meets the \ref ExtendableGraph concept, +price of it is that it only meets the +\ref hugo::skeleton::ExtendableGraphSkeleton "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 @@ -46,22 +54,19 @@ \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 -the edge set of another graph. The base graph can be an arbitrary graph and it +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. \todo Don't we need SmartNodeSet and SmartEdgeSet? \todo Some cross-refs are wrong. -\bug This file must be updated accordig to the new stile iterators. +\bug This file must be updated accordig to the new style iterators. The graph structures itself can not store data attached to the edges and nodes. However they all provide \ref maps "map classes" to dynamically attach data the to graph components. - - - The following program demonstrates the basic features of HugoLib's graph structures. @@ -190,7 +195,7 @@ 1 (2,0) 9 \endcode -In generic graph optimization programming graphs are not containers rather +As we mentioned above, graphs are not containers rather incidence structures which are iterable in many ways. HugoLib introduces concepts that allow us to attach containers to graphs. These containers are called maps. diff -r c010b38ea35b -r f3a30fda2e49 src/hugo/skeletons/graph.h --- a/src/hugo/skeletons/graph.h Thu Sep 16 19:18:18 2004 +0000 +++ b/src/hugo/skeletons/graph.h Thu Sep 16 19:23:41 2004 +0000 @@ -432,14 +432,14 @@ /// This class provides everything that \c StaticGraphSkeleton /// with additional functionality which enables to build a /// graph from scratch. - class GraphSkeleton : public StaticGraphSkeleton + class ExtendableGraphSkeleton : public StaticGraphSkeleton { public: /// Defalult constructor. /// Defalult constructor. /// - GraphSkeleton() { } + ExtendableGraphSkeleton() { } ///Add a new node to the graph. /// \return the new node. @@ -464,7 +464,7 @@ /// This class is an extension of \c GraphSkeleton. It also makes it /// possible to erase edges or nodes. - class ErasableGraphSkeleton : public GraphSkeleton + class ErasableGraphSkeleton : public ExtendableGraphSkeleton { public: /// Defalult constructor. diff -r c010b38ea35b -r f3a30fda2e49 src/test/graph_test.cc --- a/src/test/graph_test.cc Thu Sep 16 19:18:18 2004 +0000 +++ b/src/test/graph_test.cc Thu Sep 16 19:23:41 2004 +0000 @@ -52,50 +52,51 @@ } //Compile GraphSkeleton -template void checkCompileStaticGraph +template void hugo::checkCompileStaticGraph (skeleton::StaticGraphSkeleton &); -template void checkCompileGraph -(skeleton::GraphSkeleton &); +template void hugo::checkCompileGraph +(skeleton::ExtendableGraphSkeleton &); -template void checkCompileErasableGraph +template void hugo::checkCompileErasableGraph (skeleton::ErasableGraphSkeleton &); //Compile SmartGraph -template void checkCompileGraph(SmartGraph &); -template void checkCompileGraphFindEdge(SmartGraph &); +template void hugo::checkCompileGraph(SmartGraph &); +template void hugo::checkCompileGraphFindEdge(SmartGraph &); //Compile SymSmartGraph -template void checkCompileGraph(SymSmartGraph &); -template void checkCompileGraphFindEdge(SymSmartGraph &); +template void hugo::checkCompileGraph(SymSmartGraph &); +template void hugo::checkCompileGraphFindEdge(SymSmartGraph &); //Compile ListGraph -template void checkCompileGraph(ListGraph &); -template void checkCompileErasableGraph(ListGraph &); -template void checkCompileGraphFindEdge(ListGraph &); +template void hugo::checkCompileGraph(ListGraph &); +template void hugo::checkCompileErasableGraph(ListGraph &); +template void hugo::checkCompileGraphFindEdge(ListGraph &); //Compile SymListGraph -template void checkCompileGraph(SymListGraph &); -template void checkCompileErasableGraph(SymListGraph &); -template void checkCompileGraphFindEdge(SymListGraph &); +template void hugo::checkCompileGraph(SymListGraph &); +template void hugo::checkCompileErasableGraph(SymListGraph &); +template void hugo::checkCompileGraphFindEdge(SymListGraph &); //Compile FullGraph -template void checkCompileStaticGraph(FullGraph &); -template void checkCompileGraphFindEdge(FullGraph &); +template void hugo::checkCompileStaticGraph(FullGraph &); +template void hugo::checkCompileGraphFindEdge(FullGraph &); //Compile EdgeSet -template void checkCompileGraph >(EdgeSet &); -template void checkCompileGraphEraseEdge > +template void hugo::checkCompileGraph > (EdgeSet &); -template void checkCompileGraphFindEdge > +template void hugo::checkCompileGraphEraseEdge > +(EdgeSet &); +template void hugo::checkCompileGraphFindEdge > (EdgeSet &); //Compile EdgeSet -template void checkCompileGraph >(EdgeSet &); -template void checkCompileGraphEraseEdge > +template void hugo::checkCompileGraph >(EdgeSet &); +template void hugo::checkCompileGraphEraseEdge > (EdgeSet &); -template void checkCompileGraphFindEdge > +template void hugo::checkCompileGraphFindEdge > (EdgeSet &); diff -r c010b38ea35b -r f3a30fda2e49 src/work/marci/graph_wrapper_test.cc --- a/src/work/marci/graph_wrapper_test.cc Thu Sep 16 19:18:18 2004 +0000 +++ b/src/work/marci/graph_wrapper_test.cc Thu Sep 16 19:23:41 2004 +0000 @@ -56,8 +56,8 @@ // template void checkCompileStaticGraph // (skeleton::StaticGraphSkeleton &); -// template void checkCompileGraph -// (skeleton::GraphSkeleton &); +// template void checkCompileGraph +// (skeleton::ExtendableGraphSkeleton &); // template void checkCompileErasableGraph // (skeleton::ErasableGraphSkeleton &);