Changeset 4a6ef3
- 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:
- d1134d
- Parents:
- e0b960
- git-author:
- Frederik Heber <frederik.heber@…> (05/19/17 14:29:09)
- 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.hpp
re0b960 r4a6ef3 21 21 #include "types.hpp" 22 22 23 class bond; 23 24 struct BoostGraphCreator; 24 25 … … 54 55 { return distance_map; } 55 56 57 /** This is a default predicate which returns always true. 58 * 59 * \return true 60 */ 61 static bool AlwaysTruePredicate(const bond &_bond) { return true; } 62 56 63 private: 57 64 //!> typedef for a vector of BFS discovery distances -
src/Graph/unittests/BoostGraphCreatorUnitTest.cpp
re0b960 r4a6ef3 45 45 #include "Atom/atom.hpp" 46 46 #include "Graph/BoostGraphCreator.hpp" 47 #include "Graph/BreadthFirstSearchGatherer.hpp" 47 48 #include "molecule.hpp" 48 49 #include "Element/periodentafel.hpp" … … 149 150 }; 150 151 151 static bool AlwaysTruePredicate(const bond &_bond) { return true; }152 153 152 /** Tests whether createFromMolecule() works. 154 153 */ 155 154 void BoostGraphCreatorTest::createFromMoleculeTest() 156 155 { 157 BGCreator->createFromMolecule(*TestMolecule, AlwaysTruePredicate);156 BGCreator->createFromMolecule(*TestMolecule, BreadthFirstSearchGatherer::AlwaysTruePredicate); 158 157 159 158 CPPUNIT_ASSERT_EQUAL ((size_t)6, BGCreator->getNumVertices()); … … 167 166 std::vector<atom *> atoms; 168 167 std::copy(TestMolecule->begin(), TestMolecule->end(), std::back_inserter(atoms)); 169 BGCreator->createFromAtoms(atoms, AlwaysTruePredicate);168 BGCreator->createFromAtoms(atoms, BreadthFirstSearchGatherer::AlwaysTruePredicate); 170 169 171 170 CPPUNIT_ASSERT_EQUAL ((size_t)6, BGCreator->getNumVertices());
Note:
See TracChangeset
for help on using the changeset viewer.