- Timestamp:
- Jul 12, 2017, 7:10:32 PM (7 years ago)
- Branches:
- Action_Thermostats, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChemicalSpaceEvaluator, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Exclude_Hydrogens_annealWithBondGraph, Fix_Verbose_Codepatterns, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, Gui_displays_atomic_force_velocity, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, Recreated_GuiChecks, StoppableMakroAction, TremoloParser_IncreasedPrecision
- Children:
- e0b960
- Parents:
- e3ec8a8
- git-author:
- Frederik Heber <frederik.heber@…> (05/19/17 14:28:28)
- git-committer:
- Frederik Heber <frederik.heber@…> (07/12/17 19:10:32)
- Location:
- src/Graph
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Graph/BreadthFirstSearchGatherer.cpp
re3ec8a8 r966ce7 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
re3ec8a8 r966ce7 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.