Changeset bcc24f for src/Fragmentation/Homology
- Timestamp:
- Aug 9, 2013, 2:20:35 PM (12 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 98dbee
- Parents:
- a8bc27a
- git-author:
- Frederik Heber <heber@…> (06/24/13 08:07:20)
- git-committer:
- Frederik Heber <heber@…> (08/09/13 14:20:35)
- Location:
- src/Fragmentation/Homology
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Homology/HomologyContainer.cpp
ra8bc27a rbcc24f 48 48 #include "Fragmentation/Graph.hpp" 49 49 50 HomologyContainer::HomologyContainer() : 51 Observable("HomologyContainer") 52 {} 53 54 HomologyContainer::HomologyContainer(const container_t &values) : 55 Observable("HomologyContainer"), 56 container(values) 57 {} 58 50 59 std::ostream& operator<<(std::ostream &out, const HomologyContainer &homologycontainer) 51 60 { … … 80 89 } 81 90 91 void HomologyContainer::insert(const container_t &values) { 92 OBSERVE; 93 container.insert(values.begin(), values.end()); 94 } 95 96 void HomologyContainer::clear() { 97 OBSERVE; 98 container.clear(); 99 } 100 82 101 // we need to explicitly instantiate the serialization functions 83 102 BOOST_CLASS_EXPORT_IMPLEMENT(HomologyContainer) -
src/Fragmentation/Homology/HomologyContainer.hpp
ra8bc27a rbcc24f 17 17 #include <boost/serialization/export.hpp> 18 18 #include <boost/serialization/map.hpp> 19 #include <boost/serialization/split_member.hpp> 19 20 #include <boost/serialization/vector.hpp> 20 21 … … 24 25 25 26 #include "CodePatterns/IteratorAdaptors.hpp" 27 #include "CodePatterns/Observer/Observable.hpp" 26 28 27 29 #include "Fragmentation/Homology/HomologyGraph.hpp" … … 41 43 * 42 44 */ 43 class HomologyContainer 45 class HomologyContainer : public Observable 44 46 { 45 47 //!> grant access to output operator … … 54 56 typedef MapKeyConstIterator<container_t::const_iterator> const_key_iterator; 55 57 typedef std::pair< const_iterator, const_iterator> range_t; 58 56 59 public: 57 60 /** Default Constructor of class HomologyContainer. 58 61 * 59 62 */ 60 HomologyContainer() {}63 HomologyContainer(); 61 64 62 65 /** Constructor of class HomologyContainer. … … 64 67 * @param values values with with to initially fill the container 65 68 */ 66 HomologyContainer(const container_t &values) : 67 container(values) 68 {} 69 HomologyContainer(const container_t &values); 70 69 71 /** Destructor of class HomologyContainer. 70 72 * … … 101 103 * @param values graph and values to insert 102 104 */ 103 void insert(const container_t &values) { 104 container.insert(values.begin(), values.end()); 105 } 105 void insert(const container_t &values); 106 106 107 107 /** Returns iterator range with all contained graphs homologous to the given \a graph. … … 136 136 { return const_key_iterator(container.end()); } 137 137 138 const_key_iterator getNextKey(const_key_iterator &iter) const 139 { return const_key_iterator(container.upper_bound(*iter)); } 140 141 /** Clears all homologies from container. 142 * 143 */ 144 void clear(); 145 138 146 private: 139 147 //!> multimap containing all homologous graph under same key but each with its value … … 144 152 // serialization 145 153 template <typename Archive> 146 void serialize(Archive& ar, const unsigned int version) 154 void load(Archive& ar, const unsigned int version) 155 { 156 OBSERVE; 157 ar & container; 158 } 159 template <typename Archive> 160 void save(Archive& ar, const unsigned int version) const 147 161 { 148 162 ar & container; 149 163 } 164 BOOST_SERIALIZATION_SPLIT_MEMBER() 150 165 }; 151 166
Note:
See TracChangeset
for help on using the changeset viewer.