COIN-OR::LEMON - Graph Library

Changeset 654:8fd893331298 in lemon-0.x


Ignore:
Timestamp:
05/21/04 12:18:30 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@854
Message:

The new for macros are: h_for, h_for_inc, h_for_glob, h_for_inc_glob.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/for_each_macros.h

    r644 r654  
    2020  /// ...
    2121  /// Graph::NodeIt n;
    22   /// FOR_EACH_GLOB(n, g) {
     22  /// h_for_glob(n, g) {
    2323  /// ...
    2424  /// }
    2525  /// Graph::EdgeIt e;
    26   /// FOR_EACH_GLOB(e, g) {
     26  /// h_for_glob(e, g) {
    2727  /// ...
    2828  /// }
    2929  /// \endcode
    3030  /// Note that the iterated variables \c n and \c e are global ones.
     31#define h_for_glob(e, g) for((g).first((e)); (g).valid((e)); (g).next((e)))
     32
     33/// \deprecated
    3134#define FOR_EACH_GLOB(e, g) for((g).first((e)); (g).valid((e)); (g).next((e)))
    3235
     
    3841  /// Graph::Node v;
    3942  /// Graph::OutEdgeIt e;
    40   /// FOR_EACH_INC_GLOB(e, g, v) {
     43  /// h_for_inc_glob(e, g, v) {
    4144  /// ...
    4245  /// }
     
    4548  /// ...
    4649  /// BGraph::ClassNodeIt n;
    47   /// FOR_EACH_INC_GLOB(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
     50  /// h_for_inc_glob(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
    4851  /// ...
    4952  /// }
    5053  /// \endcode
    5154  /// Note that iterated variables \c e and \c n are global ones.
     55#define h_for_inc_glob(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
     56
     57/// \deprecated
    5258#define FOR_EACH_INC_GLOB(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
    5359 
     
    125131  /// Graph g;
    126132  /// ...
    127   /// FOR_EACH_LOC(Graph::NodeIt, n, g) {
     133  /// h_for(Graph::NodeIt, n, g) {
    128134  /// ...
    129135  /// }
    130   /// FOR_EACH_LOC(Graph::EdgeIt, e, g) {
     136  /// h_for(Graph::EdgeIt, e, g) {
    131137  /// ...
    132138  /// }
    133139  /// \endcode
    134140  /// Note that the iterated variables \c n and \c e are local ones.
     141#define h_for(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e))
     142 
     143/// \deprecated
    135144#define FOR_EACH_LOC(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e))
    136  
     145
    137146  /// This macro provides a comfortable interface for iterating with HUGO
    138147  /// iterators.
     
    141150  /// ...
    142151  /// Graph::Node v;
    143   /// FOR_EACH_INC_LOC(Graph::OutEdgeIt, e, g, v) {
     152  /// h_for_inc(Graph::OutEdgeIt, e, g, v) {
    144153  /// ...
    145154  /// }
     
    147156  /// BGraph h;
    148157  /// ...
    149   /// FOR_EACH_INC_LOC(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
     158  /// h_for_inc(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
    150159  /// ...
    151160  /// }
    152161  /// \endcode
    153162  /// Note that the iterated variables \c e and \c n are local ones.
     163#define h_for_inc(Ittype, e, g, v) for(Ittype e=loopFirst(Ittype(), (g), (v)); (g).valid(e); (g).next(e))
     164 
     165/// \deprecated
    154166#define FOR_EACH_INC_LOC(Ittype, e, g, v) for(Ittype e=loopFirst(Ittype(), (g), (v)); (g).valid(e); (g).next(e))
    155167 
     
    159171// #define FOR_EACH_OUTEDGE_LOC(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
    160172
    161 
    162173} //namespace hugo
    163174
  • src/work/marci/makefile

    r651 r654  
    55
    66LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
    7 BINARIES = proba6 max_flow_demo iterator_bfs_demo macro_test lg_vs_sg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_3 top_sort_test max_flow_1
     7BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_3 top_sort_test max_flow_1
    88#gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda
    99
Note: See TracChangeset for help on using the changeset viewer.