示例#1
0
bool
TaskDijkstraMin::DistanceMin(const SearchPoint &currentLocation)
{
  dijkstra.Clear();
  dijkstra.Reserve(256);

  if (currentLocation.IsValid()) {
    AddStartEdges(0, currentLocation);
  } else {
    AddZeroStartEdges();
  }

  return Run();
}
示例#2
0
  /**
   * Set the location of the sample/boundary polygon node
   * that produces the minimum task distance.
   *
   * @param locmin Location of min distance node
   */
  void SetSearchMin(const SearchPoint &locmin) {
    assert(locmin.IsValid());

    search_min = locmin;
  }
示例#3
0
  /**
   * Set the location of the sample/boundary polygon node
   * that produces the maximum task distance.
   *
   * @param locmax Location of max distance node
   */
  void SetSearchMax(const SearchPoint &locmax) {
    assert(locmax.IsValid());

    search_max = locmax;
  }