Changeset 175543
- Timestamp:
- May 23, 2017, 8:58:33 PM (8 years ago)
- Branches:
- ForceAnnealing_tocheck
- Children:
- 4daa9c
- Parents:
- b03d7d
- Location:
- src/Graph
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Graph/BreadthFirstSearchGatherer.cpp
rb03d7d r175543 58 58 distance_recorder( 59 59 DistanceMap dist, 60 const size_t _max_distance) : d(dist), max_distance(_max_distance) {}60 const int _max_distance) : d(dist), max_distance(_max_distance) {} 61 61 62 62 template <typename Edge, typename Graph> … … 68 68 template <typename Vertex, typename Graph> 69 69 void discover_vertex(Vertex u, const Graph &g) const { 70 if ((max_distance > 0) && (d[u] >= max_distance))70 if ((max_distance >= 0) && (d[u] >= max_distance)) 71 71 throw found_max_distance(); 72 72 } … … 74 74 private: 75 75 DistanceMap d; 76 const size_t max_distance;76 const int max_distance; 77 77 }; 78 78 … … 89 89 std::vector<atomId_t> BreadthFirstSearchGatherer::operator()( 90 90 const atomId_t &_discoverfrom, 91 const size_t &_max_distance)91 const int &_max_distance) 92 92 { 93 93 std::vector<atomId_t> returnids; -
src/Graph/BreadthFirstSearchGatherer.hpp
rb03d7d r175543 42 42 * 43 43 * \param _discoverfrom node to start BFS from 44 * \param _max_distance max distance to discover ( 0means all)44 * \param _max_distance max distance to discover (negative means all) 45 45 */ 46 46 std::vector<atomId_t> operator()( 47 47 const atomId_t &_discoverfrom, 48 const size_t &_max_distance = 0);48 const int &_max_distance = -1); 49 49 50 50 /** Getter to the internal map of distances of each atomic id.
Note:
See TracChangeset
for help on using the changeset viewer.