[Lemon-commits] [lemon_svn] marci: r854 - in hugo/trunk/src: hugo work/marci
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:41:52 CET 2006
Author: marci
Date: Fri May 21 12:18:30 2004
New Revision: 854
Modified:
hugo/trunk/src/hugo/for_each_macros.h
hugo/trunk/src/work/marci/makefile
Log:
The new for macros are: h_for, h_for_inc, h_for_glob, h_for_inc_glob.
Modified: hugo/trunk/src/hugo/for_each_macros.h
==============================================================================
--- hugo/trunk/src/hugo/for_each_macros.h (original)
+++ hugo/trunk/src/hugo/for_each_macros.h Fri May 21 12:18:30 2004
@@ -19,15 +19,18 @@
/// Graph g;
/// ...
/// Graph::NodeIt n;
- /// FOR_EACH_GLOB(n, g) {
+ /// h_for_glob(n, g) {
/// ...
/// }
/// Graph::EdgeIt e;
- /// FOR_EACH_GLOB(e, g) {
+ /// h_for_glob(e, g) {
/// ...
/// }
/// \endcode
/// Note that the iterated variables \c n and \c e are global ones.
+#define h_for_glob(e, g) for((g).first((e)); (g).valid((e)); (g).next((e)))
+
+/// \deprecated
#define FOR_EACH_GLOB(e, g) for((g).first((e)); (g).valid((e)); (g).next((e)))
/// This macro provides a comfortable interface for iterating with HUGO
@@ -37,18 +40,21 @@
/// ...
/// Graph::Node v;
/// Graph::OutEdgeIt e;
- /// FOR_EACH_INC_GLOB(e, g, v) {
+ /// h_for_inc_glob(e, g, v) {
/// ...
/// }
/// typedef BipartiteGraph<Graph> BGraph;
/// BGraph h;
/// ...
/// BGraph::ClassNodeIt n;
- /// FOR_EACH_INC_GLOB(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
+ /// h_for_inc_glob(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
/// ...
/// }
/// \endcode
/// Note that iterated variables \c e and \c n are global ones.
+#define h_for_inc_glob(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
+
+/// \deprecated
#define FOR_EACH_INC_GLOB(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
/// \deprecated
@@ -124,33 +130,39 @@
/// \code
/// Graph g;
/// ...
- /// FOR_EACH_LOC(Graph::NodeIt, n, g) {
+ /// h_for(Graph::NodeIt, n, g) {
/// ...
/// }
- /// FOR_EACH_LOC(Graph::EdgeIt, e, g) {
+ /// h_for(Graph::EdgeIt, e, g) {
/// ...
/// }
/// \endcode
/// Note that the iterated variables \c n and \c e are local ones.
-#define FOR_EACH_LOC(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e))
+#define h_for(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e))
+/// \deprecated
+#define FOR_EACH_LOC(Ittype, e, g) for(Ittype e=loopFirst(Ittype(), (g)); (g).valid(e); (g).next(e))
+
/// This macro provides a comfortable interface for iterating with HUGO
/// iterators.
/// \code
/// Graph g;
/// ...
/// Graph::Node v;
- /// FOR_EACH_INC_LOC(Graph::OutEdgeIt, e, g, v) {
+ /// h_for_inc(Graph::OutEdgeIt, e, g, v) {
/// ...
/// }
/// typedef BipartiteGraph<Graph> BGraph;
/// BGraph h;
/// ...
- /// FOR_EACH_INC_LOC(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
+ /// h_for_inc(BGraph::ClassNodeIt, n, h, h.S_CLASS) {
/// ...
/// }
/// \endcode
/// Note that the iterated variables \c e and \c n are local ones.
+#define h_for_inc(Ittype, e, g, v) for(Ittype e=loopFirst(Ittype(), (g), (v)); (g).valid(e); (g).next(e))
+
+/// \deprecated
#define FOR_EACH_INC_LOC(Ittype, e, g, v) for(Ittype e=loopFirst(Ittype(), (g), (v)); (g).valid(e); (g).next(e))
// #define FOR_EACH_EDGE_LOC(e, g) ezt nem tom hogy kell for((g).first((e)); (g).valid((e)); (g).next((e)))
@@ -158,7 +170,6 @@
// #define FOR_EACH_INEDGE_LOC(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
// #define FOR_EACH_OUTEDGE_LOC(e, g, v) for((g).first((e), (v)); (g).valid((e)); (g).next((e)))
-
} //namespace hugo
#endif //HUGO_FOR_EACH_MACROS_H
Modified: hugo/trunk/src/work/marci/makefile
==============================================================================
--- hugo/trunk/src/work/marci/makefile (original)
+++ hugo/trunk/src/work/marci/makefile Fri May 21 12:18:30 2004
@@ -4,7 +4,7 @@
INCLUDEDIRS ?= -I../.. -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
-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
+BINARIES = 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
#gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda
include ../makefile
More information about the Lemon-commits
mailing list