RaftLib  0.3a
C++ Stream Processing Template Library
graphtools.hpp
1 
20 #ifndef _GRAPHTOOLS_HPP_
21 #define _GRAPHTOOLS_HPP_ 1
22 #include <functional>
23 #include <set>
24 #include <queue>
25 #include <vector>
27 struct PortInfo;
28 namespace raft
29 {
30  class kernel;
31 }
32 
41 typedef std::function< void( PortInfo&,
42  PortInfo&,
43  void* ) > edge_func;
44 
46 {
47 public:
48  GraphTools() = delete;
49 
63  static void BFS( std::set< raft::kernel* > &source_kernels,
64  edge_func func,
65  void *data = nullptr,
66  bool connected_error = false );
67 
68 
82  static void BFS( std::vector< raft::kernel* > &source_kernels,
83  edge_func func,
84  void *data = nullptr,
85  bool connected_error = false );
86 private:
87  static void __BFS( std::queue< raft::kernel* > &q,
88  std::set< raft::kernel* > &s,
89  edge_func func,
90  void *data,
91  bool connected_error );
92 };
93 #endif /* END _GRAPHTOOLS_HPP_ */
Definition: graphtools.hpp:45
Definition: port_info.hpp:39
Definition: globalmap.cpp:3
static void BFS(std::set< raft::kernel * > &source_kernels, edge_func func, void *data=nullptr, bool connected_error=false)
Definition: graphtools.cpp:36