# HG changeset patch # User alpar # Date 1132147022 0 # Node ID 7a76e35e4a78fd174431c5b693392ad3987d259f # Parent ee8dd68726459d3b7ba1ec576e43853a1231f569 (UNDIR)GRAPH_TYPEDEFS also defines some basic graph maps diff -r ee8dd6872645 -r 7a76e35e4a78 lemon/graph_utils.h --- a/lemon/graph_utils.h Wed Nov 16 13:15:33 2005 +0000 +++ b/lemon/graph_utils.h Wed Nov 16 13:17:02 2005 +0000 @@ -44,7 +44,8 @@ ///This \c \#define creates convenience typedefs for the following types ///of \c Graph: \c Node, \c NodeIt, \c Edge, \c EdgeIt, \c InEdgeIt, - ///\c OutEdgeIt. + ///\c OutEdgeIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap, + ///\c BoolEdgeMap, \c IntEdgeMap, \c DoubleEdgeMap. ///\note If \c G it a template parameter, it should be used in this way. ///\code /// GRAPH_TYPEDEFS(typename G) @@ -52,19 +53,26 @@ /// ///\warning There are no typedefs for the graph maps because of the lack of ///template typedefs in C++. -#define GRAPH_TYPEDEFS(Graph) \ - typedef Graph:: Node Node; \ - typedef Graph:: NodeIt NodeIt; \ - typedef Graph:: Edge Edge; \ - typedef Graph:: EdgeIt EdgeIt; \ - typedef Graph:: InEdgeIt InEdgeIt; \ - typedef Graph::OutEdgeIt OutEdgeIt; +#define GRAPH_TYPEDEFS(Graph) \ + typedef Graph:: Node Node; \ + typedef Graph:: NodeIt NodeIt; \ + typedef Graph:: Edge Edge; \ + typedef Graph:: EdgeIt EdgeIt; \ + typedef Graph:: InEdgeIt InEdgeIt; \ + typedef Graph::OutEdgeIt OutEdgeIt; \ + typedef Graph::Nodemap BoolNodeMap; \ + typedef Graph::Nodemap IntNodeMap; \ + typedef Graph::Nodemap DoubleNodeMap; \ + typedef Graph::Edgemap BoolEdgeMap; \ + typedef Graph::Edgemap IntEdgeMap; \ + typedef Graph::Edgemap DoubleEdgeMap; ///Creates convenience typedefs for the undirected graph types and iterators ///This \c \#define creates the same convenience typedefs as defined by ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt, + ///\c BoolUndirEdgeMap, \c IntUndirEdgeMap, \c DoubleUndirEdgeMap. /// ///\note If \c G it a template parameter, it should be used in this way. ///\code @@ -73,11 +81,15 @@ /// ///\warning There are no typedefs for the graph maps because of the lack of ///template typedefs in C++. -#define UNDIRGRAPH_TYPEDEFS(Graph) \ - GRAPH_TYPEDEFS(Graph) \ - typedef Graph:: UndirEdge UndirEdge; \ - typedef Graph:: UndirEdgeIt UndirEdgeIt; \ - typedef Graph:: IncEdgeIt IncEdgeIt; +#define UNDIRGRAPH_TYPEDEFS(Graph) \ + GRAPH_TYPEDEFS(Graph) \ + typedef Graph:: UndirEdge UndirEdge; \ + typedef Graph:: UndirEdgeIt UndirEdgeIt; \ + typedef Graph:: IncEdgeIt IncEdgeIt; \ + typedef Graph::UndirEdgemap BoolUndirEdgeMap; \ + typedef Graph::UndirEdgemap IntUndirEdgeMap; \ + typedef Graph::UndirEdgemap DoubleUndirEdgeMap; + /// \brief Function to count the items in the graph.