Skip to content
Snippets Groups Projects

Resolve "Graph search"

Merged Joan Vallvé Navarro requested to merge 404-graph-search into devel
Files
5
+ 44
0
#ifndef GRAPH_SEARCH_H
#define GRAPH_SEARCH_H
#include "core/common/wolf.h"
#include "core/frame/frame_base.h"
#include "core/factor/factor_base.h"
#include <map>
namespace wolf
{
class GraphSearch
{
private:
std::map<FrameBasePtr, std::pair<FactorBasePtr,FrameBasePtr>> parents_;
public:
GraphSearch();
~GraphSearch();
FactorBasePtrList computeShortestPath(FrameBasePtr frm1,
FrameBasePtr frm2,
const unsigned int max_graph_dist = 0);
std::set<FrameBasePtr> getNeighborFrames(const std::set<FrameBasePtr>& frms);
static FactorBasePtrList shortestPath(FrameBasePtr frm1,
FrameBasePtr frm2,
const unsigned int max_graph_dist = 0)
{
GraphSearch graph_search;
return graph_search.computeShortestPath(frm1, frm2, max_graph_dist);
}
};
} // namespace wolf
#endif
Loading