Пример #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
  /**
   * 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
  /**
   * 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;
  }