COIN-OR::LEMON - Graph Library

Changeset 1804:7a76e35e4a78 in lemon-0.x for lemon


Ignore:
Timestamp:
11/16/05 14:17:02 (14 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2347
Message:

(UNDIR)GRAPH_TYPEDEFS also defines some basic graph maps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/graph_utils.h

    r1756 r1804  
    4545  ///This \c \#define creates convenience typedefs for the following types
    4646  ///of \c Graph: \c Node,  \c NodeIt, \c Edge, \c EdgeIt, \c InEdgeIt,
    47   ///\c OutEdgeIt.
     47  ///\c OutEdgeIt,  \c BoolNodeMap,  \c IntNodeMap,  \c DoubleNodeMap,
     48  ///\c BoolEdgeMap, \c IntEdgeMap,  \c DoubleEdgeMap. 
    4849  ///\note If \c G it a template parameter, it should be used in this way.
    4950  ///\code
     
    5354  ///\warning There are no typedefs for the graph maps because of the lack of
    5455  ///template typedefs in C++.
    55 #define GRAPH_TYPEDEFS(Graph)                   \
    56   typedef Graph::     Node      Node;           \
    57     typedef Graph::   NodeIt    NodeIt;         \
    58     typedef Graph::   Edge      Edge;           \
    59     typedef Graph::   EdgeIt    EdgeIt;         \
    60     typedef Graph:: InEdgeIt  InEdgeIt;         \
    61     typedef Graph::OutEdgeIt OutEdgeIt;
     56#define GRAPH_TYPEDEFS(Graph)                           \
     57  typedef Graph::     Node      Node;                   \
     58    typedef Graph::   NodeIt    NodeIt;                 \
     59    typedef Graph::   Edge      Edge;                   \
     60    typedef Graph::   EdgeIt    EdgeIt;                 \
     61    typedef Graph:: InEdgeIt  InEdgeIt;                 \
     62    typedef Graph::OutEdgeIt OutEdgeIt;                 \
     63    typedef Graph::Nodemap<bool> BoolNodeMap;           \
     64    typedef Graph::Nodemap<int> IntNodeMap;             \
     65    typedef Graph::Nodemap<double> DoubleNodeMap;       \
     66    typedef Graph::Edgemap<bool> BoolEdgeMap;           \
     67    typedef Graph::Edgemap<int> IntEdgeMap;             \
     68    typedef Graph::Edgemap<double> DoubleEdgeMap;
    6269 
    6370  ///Creates convenience typedefs for the undirected graph types and iterators
     
    6673  ///\ref GRAPH_TYPEDEFS(Graph) and three more, namely it creates
    6774  ///\c UndirEdge, \c UndirEdgeIt, \c IncEdgeIt,
     75  ///\c BoolUndirEdgeMap, \c IntUndirEdgeMap,  \c DoubleUndirEdgeMap. 
    6876  ///
    6977  ///\note If \c G it a template parameter, it should be used in this way.
     
    7482  ///\warning There are no typedefs for the graph maps because of the lack of
    7583  ///template typedefs in C++.
    76 #define UNDIRGRAPH_TYPEDEFS(Graph)                      \
    77   GRAPH_TYPEDEFS(Graph)                                 \
    78     typedef Graph:: UndirEdge   UndirEdge;              \
    79     typedef Graph:: UndirEdgeIt UndirEdgeIt;            \
    80     typedef Graph:: IncEdgeIt   IncEdgeIt;
     84#define UNDIRGRAPH_TYPEDEFS(Graph)                              \
     85  GRAPH_TYPEDEFS(Graph)                                         \
     86    typedef Graph:: UndirEdge   UndirEdge;                      \
     87    typedef Graph:: UndirEdgeIt UndirEdgeIt;                    \
     88    typedef Graph:: IncEdgeIt   IncEdgeIt;                      \
     89    typedef Graph::UndirEdgemap<bool> BoolUndirEdgeMap;         \
     90    typedef Graph::UndirEdgemap<int> IntUndirEdgeMap;           \
     91    typedef Graph::UndirEdgemap<double> DoubleUndirEdgeMap;
     92 
    8193
    8294
Note: See TracChangeset for help on using the changeset viewer.