Changeset 6e1c14
- Timestamp:
- Jul 5, 2017, 7:43:00 PM (8 years ago)
- Branches:
- ForceAnnealing_oldresults, IndependentFragmentGrids_IntegrationTest
- Children:
- d619f5c
- Parents:
- 9b5fa6
- git-author:
- Frederik Heber <frederik.heber@…> (05/19/17 14:28:28)
- git-committer:
- Frederik Heber <frederik.heber@…> (07/05/17 19:43:00)
- Location:
- src/Graph
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Graph/BreadthFirstSearchGatherer.cpp
r9b5fa6 r6e1c14 111 111 112 112 // any node was discovered whose distances is less than num_vertices+1 113 distance_map.clear(); 113 114 const BoostGraphCreator::const_name_map_t name_map = boost::get(boost::vertex_name, BGgraph); 114 115 BoostGraphCreator::vertex_iter vp, vpend; … … 117 118 if (distances[v] != (num_vertices+1)) { 118 119 returnids.push_back( boost::get(name_map, v) ); 120 distance_map.insert( std::make_pair(boost::get(name_map, v), distances[v]) ); 119 121 } 120 122 } -
src/Graph/BreadthFirstSearchGatherer.hpp
r9b5fa6 r6e1c14 15 15 #endif 16 16 17 #include <map> 17 18 #include <stddef.h> 18 19 #include <vector> … … 27 28 struct BreadthFirstSearchGatherer 28 29 { 30 //!> typedef for the distance map to the obtained atomic id set. 31 typedef std::map<atomId_t, size_t> distance_map_t; 32 29 33 /** Cstor of class BreadthFirstSearchGatherer. 30 34 * … … 43 47 const int &_max_distance = -1); 44 48 49 /** Getter to the internal map of distances of each atomic id. 50 * 51 * \return ref to distance map 52 */ 53 const distance_map_t& getDistances() const 54 { return distance_map; } 55 45 56 private: 46 //!> typedef for a vector withBFS discovery distances57 //!> typedef for a vector of BFS discovery distances 47 58 typedef std::vector<size_t> distances_t; 59 60 //!> BFS discovery distances for the returned atomic id set 61 distance_map_t distance_map; 48 62 49 63 //!> graph to operate on
Note:
See TracChangeset
for help on using the changeset viewer.