Changeset effdea


Ignore:
Timestamp:
Jul 5, 2017, 7:43:00 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_oldresults, IndependentFragmentGrids_IntegrationTest
Children:
8efcf4
Parents:
d619f5c
git-author:
Frederik Heber <frederik.heber@…> (05/19/17 14:29:09)
git-committer:
Frederik Heber <frederik.heber@…> (07/05/17 19:43:00)
Message:

Moved AlwaysTruePredicate from BoostGraphCreatorUnitTest into BreadthFirstSearchGatherer.

Location:
src/Graph
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Graph/BreadthFirstSearchGatherer.hpp

    rd619f5c reffdea  
    2121#include "types.hpp"
    2222
     23class bond;
    2324struct BoostGraphCreator;
    2425
     
    5455  { return distance_map; }
    5556
     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
    5663private:
    5764  //!> typedef for a vector of BFS discovery distances
  • src/Graph/unittests/BoostGraphCreatorUnitTest.cpp

    rd619f5c reffdea  
    4545#include "Atom/atom.hpp"
    4646#include "Graph/BoostGraphCreator.hpp"
     47#include "Graph/BreadthFirstSearchGatherer.hpp"
    4748#include "molecule.hpp"
    4849#include "Element/periodentafel.hpp"
     
    149150};
    150151
    151 static bool AlwaysTruePredicate(const bond &_bond) { return true; }
    152 
    153152/** Tests whether createFromMolecule() works.
    154153 */
    155154void BoostGraphCreatorTest::createFromMoleculeTest()
    156155{
    157   BGCreator->createFromMolecule(*TestMolecule, AlwaysTruePredicate);
     156  BGCreator->createFromMolecule(*TestMolecule, BreadthFirstSearchGatherer::AlwaysTruePredicate);
    158157
    159158  CPPUNIT_ASSERT_EQUAL ((size_t)6, BGCreator->getNumVertices());
     
    167166  std::vector<atom *> atoms;
    168167  std::copy(TestMolecule->begin(), TestMolecule->end(), std::back_inserter(atoms));
    169   BGCreator->createFromAtoms(atoms, AlwaysTruePredicate);
     168  BGCreator->createFromAtoms(atoms, BreadthFirstSearchGatherer::AlwaysTruePredicate);
    170169
    171170  CPPUNIT_ASSERT_EQUAL ((size_t)6, BGCreator->getNumVertices());
Note: See TracChangeset for help on using the changeset viewer.