コード例 #1
0
  /**
   * Return top element of queue for processing
   *
   * @return Node for processing
   */
  const Node &pop() {
    cur = q.top().iterator;

    do
      q.pop();
    while (!q.empty() && q.top().iterator->second.value < q.top().edge_value);

    return cur->first;
  }
コード例 #2
0
ファイル: Dijkstra.hpp プロジェクト: DRIZO/xcsoar
  /**
   * Return top element of queue for processing
   *
   * @return Node for processing
   */
  Node Pop() {
    edge_const_iterator cur(q.top().iterator);
    current_value = cur->second.value;

    do {
      q.pop();
    } while (!q.empty() && q.top().iterator->second.value < q.top().edge_value);

    return cur->first;
  }
コード例 #3
0
ファイル: AStar.hpp プロジェクト: badbadc0ffee/XCSoar
  /**
   * Return top element of queue for processing
   *
   * @return Node for processing
   */
  const Node &Pop() {
    cur = q.top().iterator;

    do { // remove this item
      q.pop();
    } while (!q.empty() && (q.top().priority > q.top().iterator->second));
    // and all lower rank than this

    return cur->first;
  }