bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
boost_graph_utils.h
Go to the documentation of this file.
1#ifndef BOOST_GRAPH_UTILS_H
2#define BOOST_GRAPH_UTILS_H
3
4#include "bitrl/bitrl_types.h"
6
7namespace bitrl
8{
9namespace utils {
10
11template<typename GraphType, typename Predicate>
14
15 for(uint_t v=0; v<graph.n_vertices(); ++v){
16 const auto& vertex = graph.get_vertex(v);
17 if(pred(vertex)){
18 return vertex.id;
19 }
20 }
21
23}
24
25}
26}
27#endif // BOOST_GRAPH_UTILS_H
const uint_t INVALID_ID
Invalid id.
Definition bitrl_consts.h:21
uint_t find_vertex(const GraphType &graph, const Predicate &pred)
Definition boost_graph_utils.h:13
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14
std::size_t uint_t
uint_t
Definition bitrl_types.h:43