Changeset 615:b6b31b75b522 in lemon-0.x for src/work/marci
- Timestamp:
- 05/11/04 21:50:21 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@800
- Location:
- src/work/marci
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/bfs_dfs.h
r604 r615 3 3 #define HUGO_BFS_DFS_H 4 4 5 // ///\ingroup gwrappers6 /// \file7 /// \brief Bfs and dfs iterators.5 /// \ingroup galgs 6 /// \file 7 /// \brief Bfs and dfs iterators. 8 8 /// 9 /// This file contains bfs and dfs iterator classes.9 /// This file contains bfs and dfs iterator classes. 10 10 /// 11 // /// \author Marton Makai11 // /// \author Marton Makai 12 12 13 13 #include <queue> … … 22 22 /// \c reached_map 23 23 /// Reached have to work as read-write bool Node-map. 24 /// \ingroup galgs 24 25 template <typename Graph, /*typename OutEdgeIt,*/ 25 26 typename ReachedMap/*=typename Graph::NodeMap<bool>*/ > … … 106 107 return *this; 107 108 } 108 /// 109 /// Guess what? 109 110 bool finished() const { return bfs_queue.empty(); } 110 111 /// The conversion operator makes for converting the bfs-iterator … … 112 113 ///\bug Edge have to be in HUGO 0.2 113 114 operator OutEdgeIt() const { return actual_edge; } 114 /// 115 /// Guess what? 115 116 bool isBNodeNewlyReached() const { return b_node_newly_reached; } 116 /// 117 /// Guess what? 117 118 bool isANodeExamined() const { return !(graph->valid(actual_edge)); } 118 /// 119 /// Guess what? 119 120 Node aNode() const { return bfs_queue.front(); } 120 /// 121 /// Guess what? 121 122 Node bNode() const { return graph->bNode(actual_edge); } 122 /// 123 /// Guess what? 123 124 const ReachedMap& getReachedMap() const { return reached; } 124 /// 125 /// Guess what? 125 126 const std::queue<Node>& getBfsQueue() const { return bfs_queue; } 126 }; 127 }; 127 128 128 129 /// Bfs searches for the nodes wich are not marked in … … 130 131 /// Reached have to work as a read-write bool Node-map, 131 132 /// Pred is a write Edge Node-map and 132 /// Dist is a read-write int Node-map, have to be. 133 ///\todo In fact onsly simple operations requirement are needed for 134 /// Dist::Value. 133 /// Dist is a read-write Node-map of integral value, have to be. 134 /// \ingroup galgs 135 135 template <typename Graph, 136 136 typename ReachedMap=typename Graph::template NodeMap<bool>, … … 179 179 return *this; 180 180 } 181 /// 181 /// Guess what? 182 182 const PredMap& getPredMap() const { return pred; } 183 /// 183 /// Guess what? 184 184 const DistMap& getDistMap() const { return dist; } 185 185 }; … … 188 188 /// \c reached_map 189 189 /// Reached have to be a read-write bool Node-map. 190 /// \ingroup galgs 190 191 template <typename Graph, /*typename OutEdgeIt,*/ 191 192 typename ReachedMap/*=typename Graph::NodeMap<bool>*/ > … … 249 250 return *this; 250 251 } 251 /// 252 /// Guess what? 252 253 bool finished() const { return dfs_stack.empty(); } 253 /// 254 /// Guess what? 254 255 operator OutEdgeIt() const { return actual_edge; } 255 /// 256 /// Guess what? 256 257 bool isBNodeNewlyReached() const { return b_node_newly_reached; } 257 /// 258 /// Guess what? 258 259 bool isANodeExamined() const { return !(graph->valid(actual_edge)); } 259 /// 260 /// Guess what? 260 261 Node aNode() const { return actual_node; /*FIXME*/} 261 /// 262 /// Guess what? 262 263 Node bNode() const { return graph->bNode(actual_edge); } 263 /// 264 /// Guess what? 264 265 const ReachedMap& getReachedMap() const { return reached; } 265 /// 266 /// Guess what? 266 267 const std::stack<OutEdgeIt>& getDfsStack() const { return dfs_stack; } 267 268 }; … … 271 272 /// Reached is a read-write bool Node-map, 272 273 /// Pred is a write Node-map, have to be. 274 /// \ingroup galgs 273 275 template <typename Graph, 274 276 typename ReachedMap=typename Graph::template NodeMap<bool>, … … 313 315 return *this; 314 316 } 315 /// 317 /// Guess what? 316 318 const PredMap& getPredMap() const { return pred; } 317 319 }; -
src/work/marci/bfs_dfs_misc.h
r604 r615 3 3 #define HUGO_BFS_DFS_MISC_H 4 4 5 // ///\ingroup gwrappers6 /// \file7 /// \brief Miscellaneous algorithms using bfs and dfs.5 /// \ingroup galgs 6 /// \file 7 /// \brief Miscellaneous algorithms using bfs and dfs. 8 8 /// 9 /// This file contains several algorithms using bfs and dfs.9 /// This file contains several algorithms using bfs and dfs. 10 10 /// 11 11 // ///\author Marton Makai … … 16 16 namespace hugo { 17 17 18 /// This function eat a read-write \c BoolMap& bool_map,18 /// This function eats a read-write \c BoolMap& bool_map, 19 19 /// which have to work well up 20 20 /// to its \c set and \c operator[]() method. Thus we have to deal 21 21 /// very carefully with an uninitialized \c IterableBoolMap. 22 /// \ingroup galgs 22 23 template<typename Graph, typename BoolMap> 23 24 bool isBipartite(const Graph& g, BoolMap& bool_map) { … … 53 54 /// then going back from the returned node via the pred information, a 54 55 /// cycle is obtained. 56 /// \ingroup galgs 55 57 template<typename Graph, typename PredMap> 56 58 typename Graph::Node … … 90 92 return INVALID; 91 93 } 94 92 95 } //namespace hugo 93 96 -
src/work/marci/makefile
r613 r615 5 5 6 6 LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo 7 BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_3 top_sort_test 7 BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_3 top_sort_test max_flow_1 8 8 #gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda 9 9 -
src/work/marci/max_bipartite_matching.h
r613 r615 2 2 #ifndef HUGO_MAX_BIPARTITE_MATCHING_H 3 3 #define HUGO_MAX_BIPARTITE_MATCHING_H 4 5 /// \ingroup galgs 6 /// \file 7 /// \brief Maximum bipartite matchings, b-matchings and 8 /// capacitated b-matchings. 9 /// 10 /// This file contains a class for bipartite maximum matching, b-matchings 11 /// and capacitated b-matching computations. 12 /// 13 // /// \author Marton Makai 4 14 5 15 //#include <for_each_macros.h>
Note: See TracChangeset
for help on using the changeset viewer.