lemon/core.h
changeset 302 1871777f62b7
parent 282 dc9e8d2c0df9
child 313 64f8f7cc6168
equal deleted inserted replaced
4:8b39b894a76c 5:30c8eb4d757d
    56 #endif
    56 #endif
    57 
    57 
    58   /// \addtogroup gutils
    58   /// \addtogroup gutils
    59   /// @{
    59   /// @{
    60 
    60 
    61   ///Create convenient typedefs for the digraph types and iterators
    61   ///Create convenience typedefs for the digraph types and iterators
    62 
    62 
    63   ///This \c \#define creates convenient type definitions for the following
    63   ///This \c \#define creates convenient type definitions for the following
    64   ///types of \c Digraph: \c Node,  \c NodeIt, \c Arc, \c ArcIt, \c InArcIt,
    64   ///types of \c Digraph: \c Node,  \c NodeIt, \c Arc, \c ArcIt, \c InArcIt,
    65   ///\c OutArcIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap,
    65   ///\c OutArcIt, \c BoolNodeMap, \c IntNodeMap, \c DoubleNodeMap,
    66   ///\c BoolArcMap, \c IntArcMap, \c DoubleArcMap.
    66   ///\c BoolArcMap, \c IntArcMap, \c DoubleArcMap.
    78   typedef Digraph::NodeMap<bool> BoolNodeMap;                           \
    78   typedef Digraph::NodeMap<bool> BoolNodeMap;                           \
    79   typedef Digraph::NodeMap<int> IntNodeMap;                             \
    79   typedef Digraph::NodeMap<int> IntNodeMap;                             \
    80   typedef Digraph::NodeMap<double> DoubleNodeMap;                       \
    80   typedef Digraph::NodeMap<double> DoubleNodeMap;                       \
    81   typedef Digraph::ArcMap<bool> BoolArcMap;                             \
    81   typedef Digraph::ArcMap<bool> BoolArcMap;                             \
    82   typedef Digraph::ArcMap<int> IntArcMap;                               \
    82   typedef Digraph::ArcMap<int> IntArcMap;                               \
    83   typedef Digraph::ArcMap<double> DoubleArcMap;
    83   typedef Digraph::ArcMap<double> DoubleArcMap
    84 
    84 
    85   ///Create convenient typedefs for the digraph types and iterators
    85   ///Create convenience typedefs for the digraph types and iterators
    86 
    86 
    87   ///\see DIGRAPH_TYPEDEFS
    87   ///\see DIGRAPH_TYPEDEFS
    88   ///
    88   ///
    89   ///\note Use this macro, if the graph type is a dependent type,
    89   ///\note Use this macro, if the graph type is a dependent type,
    90   ///ie. the graph type depend on a template parameter.
    90   ///ie. the graph type depend on a template parameter.
    98   typedef typename Digraph::template NodeMap<bool> BoolNodeMap;         \
    98   typedef typename Digraph::template NodeMap<bool> BoolNodeMap;         \
    99   typedef typename Digraph::template NodeMap<int> IntNodeMap;           \
    99   typedef typename Digraph::template NodeMap<int> IntNodeMap;           \
   100   typedef typename Digraph::template NodeMap<double> DoubleNodeMap;     \
   100   typedef typename Digraph::template NodeMap<double> DoubleNodeMap;     \
   101   typedef typename Digraph::template ArcMap<bool> BoolArcMap;           \
   101   typedef typename Digraph::template ArcMap<bool> BoolArcMap;           \
   102   typedef typename Digraph::template ArcMap<int> IntArcMap;             \
   102   typedef typename Digraph::template ArcMap<int> IntArcMap;             \
   103   typedef typename Digraph::template ArcMap<double> DoubleArcMap;
   103   typedef typename Digraph::template ArcMap<double> DoubleArcMap
   104 
   104 
   105   ///Create convenient typedefs for the graph types and iterators
   105   ///Create convenience typedefs for the graph types and iterators
   106 
   106 
   107   ///This \c \#define creates the same convenient type definitions as defined
   107   ///This \c \#define creates the same convenient type definitions as defined
   108   ///by \ref DIGRAPH_TYPEDEFS(Graph) and six more, namely it creates
   108   ///by \ref DIGRAPH_TYPEDEFS(Graph) and six more, namely it creates
   109   ///\c Edge, \c EdgeIt, \c IncEdgeIt, \c BoolEdgeMap, \c IntEdgeMap,
   109   ///\c Edge, \c EdgeIt, \c IncEdgeIt, \c BoolEdgeMap, \c IntEdgeMap,
   110   ///\c DoubleEdgeMap.
   110   ///\c DoubleEdgeMap.
   117   typedef Graph::Edge Edge;                                             \
   117   typedef Graph::Edge Edge;                                             \
   118   typedef Graph::EdgeIt EdgeIt;                                         \
   118   typedef Graph::EdgeIt EdgeIt;                                         \
   119   typedef Graph::IncEdgeIt IncEdgeIt;                                   \
   119   typedef Graph::IncEdgeIt IncEdgeIt;                                   \
   120   typedef Graph::EdgeMap<bool> BoolEdgeMap;                             \
   120   typedef Graph::EdgeMap<bool> BoolEdgeMap;                             \
   121   typedef Graph::EdgeMap<int> IntEdgeMap;                               \
   121   typedef Graph::EdgeMap<int> IntEdgeMap;                               \
   122   typedef Graph::EdgeMap<double> DoubleEdgeMap;
   122   typedef Graph::EdgeMap<double> DoubleEdgeMap
   123 
   123 
   124   ///Create convenient typedefs for the graph types and iterators
   124   ///Create convenience typedefs for the graph types and iterators
   125 
   125 
   126   ///\see GRAPH_TYPEDEFS
   126   ///\see GRAPH_TYPEDEFS
   127   ///
   127   ///
   128   ///\note Use this macro, if the graph type is a dependent type,
   128   ///\note Use this macro, if the graph type is a dependent type,
   129   ///ie. the graph type depend on a template parameter.
   129   ///ie. the graph type depend on a template parameter.
   132   typedef typename Graph::Edge Edge;                                    \
   132   typedef typename Graph::Edge Edge;                                    \
   133   typedef typename Graph::EdgeIt EdgeIt;                                \
   133   typedef typename Graph::EdgeIt EdgeIt;                                \
   134   typedef typename Graph::IncEdgeIt IncEdgeIt;                          \
   134   typedef typename Graph::IncEdgeIt IncEdgeIt;                          \
   135   typedef typename Graph::template EdgeMap<bool> BoolEdgeMap;           \
   135   typedef typename Graph::template EdgeMap<bool> BoolEdgeMap;           \
   136   typedef typename Graph::template EdgeMap<int> IntEdgeMap;             \
   136   typedef typename Graph::template EdgeMap<int> IntEdgeMap;             \
   137   typedef typename Graph::template EdgeMap<double> DoubleEdgeMap;
   137   typedef typename Graph::template EdgeMap<double> DoubleEdgeMap
   138 
   138 
   139   /// \brief Function to count the items in a graph.
   139   /// \brief Function to count the items in a graph.
   140   ///
   140   ///
   141   /// This function counts the items (nodes, arcs etc.) in a graph.
   141   /// This function counts the items (nodes, arcs etc.) in a graph.
   142   /// The complexity of the function is linear because
   142   /// The complexity of the function is linear because