/* * BreadthFirstSearchGatherer.hpp * * Created on: May 17, 2017 * Author: heber */ #ifndef GRAPH_BREADTHFIRSTSEARCHGATHERER_HPP_ #define GRAPH_BREADTHFIRSTSEARCHGATHERER_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include "types.hpp" struct BoostGraphCreator; /** This struct performs a BFS on a given boost::graph and finds * all nodes, i.e. atoms, up to a given limit. */ struct BreadthFirstSearchGatherer { /** Cstor of class BreadthFirstSearchGatherer. * * \param _graph graph to work on */ BreadthFirstSearchGatherer(BoostGraphCreator &_graph); /** Discovers all nodes from the given \a _discoverfrom and returns * the vector of ids. */ std::vector operator()(const atomId_t &_discoverfrom); private: //!> typedef for a vector with BFS discovery distances typedef std::vector distances_t; //!> graph to operate on BoostGraphCreator &BGcreator; }; #endif /* GRAPH_BREADTHFIRSTSEARCHGATHERER_HPP_ */