Changeset bccbe9 for src/Graph/BoostGraphCreator.hpp
- Timestamp:
- Jul 12, 2017, 7:10:31 PM (8 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:
- 6e5b8d
- Parents:
- d24ef58
- git-author:
- Frederik Heber <frederik.heber@…> (05/18/17 17:45:47)
- git-committer:
- Frederik Heber <frederik.heber@…> (07/12/17 19:10:31)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Graph/BoostGraphCreator.hpp
rd24ef58 rbccbe9 15 15 #endif 16 16 17 #include <map> 17 18 #include <vector> 18 19 19 20 #include <boost/function.hpp> 20 21 #include <boost/graph/adjacency_list.hpp> 22 23 #include "types.hpp" 21 24 22 25 class atom; … … 32 35 //!> typedef for an undirected graph using boost::graph 33 36 typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS, 34 boost:: no_property, boost::no_property > UndirectedGraph;37 boost::property<boost::vertex_name_t, atomId_t>, boost::no_property > UndirectedGraph; 35 38 //!> typedef for a map of graph node indices 36 typedef boost::property_map < boost::adjacency_list <>, boost::vertex_index_t >::type index_map_t; 39 typedef boost::property_map < UndirectedGraph, boost::vertex_index_t >::type index_map_t; 40 typedef boost::property_map < UndirectedGraph, boost::vertex_index_t >::const_type const_index_map_t; 41 //!> typedef for a map of graph node indices 42 typedef boost::property_map < UndirectedGraph, boost::vertex_name_t >::type name_map_t; 43 typedef boost::property_map < UndirectedGraph, boost::vertex_name_t >::const_type const_name_map_t; 37 44 //!> typedef for the predicate to evaluate for adding the current edge or not 38 45 typedef boost::function<bool (const bond &)> predicate_t; 46 //!> typedef for a Vertex 47 typedef boost::graph_traits<UndirectedGraph>::vertex_descriptor Vertex; 48 //!> typedef for vertex iterator 49 typedef boost::graph_traits<UndirectedGraph>::vertex_iterator vertex_iter; 39 50 51 //!> typedef for a node id 52 typedef size_t nodeId_t; 53 //!> typedef for map converting between node id in graph and the associated atomic id 54 typedef std::map<atomId_t, nodeId_t> atomids_nodeids_t; 40 55 41 56 /** Creates the boost::graph using all atoms and bonds in the given \a _mol. … … 89 104 } 90 105 106 /** Returns the node id to a given atom id \a _atomid. 107 * 108 * \param _atomid atom id 109 * \return node id 110 */ 111 nodeId_t getNodeId(const atomId_t &_atomid) const; 112 91 113 private: 92 114 /** General purpose function that contains the internal logic of walking the … … 114 136 //!> internal graph that is created by creator functions 115 137 UndirectedGraph graph; 138 //!> external property map for all the atomic ids of each graph node 139 atomids_nodeids_t atomids_nodeids; 116 140 }; 117 141
Note:
See TracChangeset
for help on using the changeset viewer.