Changeset 175543


Ignore:
Timestamp:
May 23, 2017, 8:58:33 PM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
ForceAnnealing_tocheck
Children:
4daa9c
Parents:
b03d7d
Message:

tempcommit: Merge with 060fc39

Location:
src/Graph
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Graph/BreadthFirstSearchGatherer.cpp

    rb03d7d r175543  
    5858  distance_recorder(
    5959      DistanceMap dist,
    60       const size_t _max_distance) : d(dist), max_distance(_max_distance) {}
     60      const int _max_distance) : d(dist), max_distance(_max_distance) {}
    6161
    6262  template <typename Edge, typename Graph>
     
    6868  template <typename Vertex, typename Graph>
    6969  void discover_vertex(Vertex u, const Graph &g) const {
    70     if ((max_distance > 0) && (d[u] >= max_distance))
     70    if ((max_distance >= 0) && (d[u] >= max_distance))
    7171      throw found_max_distance();
    7272  }
     
    7474private:
    7575  DistanceMap d;
    76   const size_t max_distance;
     76  const int max_distance;
    7777};
    7878
     
    8989std::vector<atomId_t> BreadthFirstSearchGatherer::operator()(
    9090    const atomId_t &_discoverfrom,
    91     const size_t &_max_distance)
     91    const int &_max_distance)
    9292{
    9393  std::vector<atomId_t> returnids;
  • src/Graph/BreadthFirstSearchGatherer.hpp

    rb03d7d r175543  
    4242   *
    4343   * \param _discoverfrom node to start BFS from
    44    * \param _max_distance max distance to discover (0 means all)
     44   * \param _max_distance max distance to discover (negative means all)
    4545   */
    4646  std::vector<atomId_t> operator()(
    4747      const atomId_t &_discoverfrom,
    48       const size_t &_max_distance = 0);
     48      const int &_max_distance = -1);
    4949
    5050  /** Getter to the internal map of distances of each atomic id.
Note: See TracChangeset for help on using the changeset viewer.