bitrl & cuberl Documentation
Simulation engine for reinforcement learning agents
Loading...
Searching...
No Matches
a_star_search.h File Reference
#include "cubeai/base/cubeai_types.h"
#include <utility>
#include <set>
#include <queue>
#include <map>
Include dependency graph for a_star_search.h:

Go to the source code of this file.

Classes

struct  cubeai::astar_impl::fcost_astar_node_compare
 
struct  cubeai::astar_impl::id_astar_node_compare
 

Namespaces

namespace  cubeai
 
namespace  cubeai::astar_impl
 

Functions

template<typename MapType , typename KeyArgType , typename ValueArgType >
MapType::iterator cubeai::astar_impl::add_or_update_map (MapType &map, const KeyArgType &k, const ValueArgType &v)
 See Scott Meyers Effective STL Item 24 for this function. If k isn't in the map efficiently add pair (k,v) otherwise efficiently update to v the value associated with k. Return an interator to the added or modified pair.
 
template<typename GraphTp , typename H >
std::multimap< uint_t, uint_t > cubeai::a_star_search (GraphTp &g, typename GraphTp::vertex_type &start, typename GraphTp::vertex_type &end, const H &h)
 Simple implementation of A* algorithm at the moment the algorithm is only usable with a boost_unidirected_serial_graph graph.
 
template<typename IdTp >
std::vector< IdTp > cubeai::reconstruct_a_star_path (const std::multimap< IdTp, IdTp > &map, const IdTp &start)