Lines Matching refs:front_
116 TrivialQueue() : QueueBase<S>(TRIVIAL_QUEUE), front_(kNoStateId) {} in TrivialQueue()
117 StateId Head() const { return front_; } in Head()
118 void Enqueue(StateId s) { front_ = s; } in Enqueue()
119 void Dequeue() { front_ = kNoStateId; } in Dequeue()
121 bool Empty() const { return front_ == kNoStateId; } in Empty()
122 void Clear() { front_ = kNoStateId; } in Clear()
136 StateId front_; variable
322 : QueueBase<S>(TOP_ORDER_QUEUE), front_(0), back_(kNoStateId), in TopOrderQueue()
337 : QueueBase<S>(TOP_ORDER_QUEUE), front_(0), back_(kNoStateId), in TopOrderQueue()
340 StateId Head() const { return state_[front_]; } in Head()
343 if (front_ > back_) front_ = back_ = order_[s]; in Enqueue()
345 else if (order_[s] < front_) front_ = order_[s]; in Enqueue()
350 state_[front_] = kNoStateId; in Dequeue()
351 while ((front_ <= back_) && (state_[front_] == kNoStateId)) ++front_; in Dequeue()
356 bool Empty() const { return front_ > back_; } in Empty()
359 for (StateId i = front_; i <= back_; ++i) state_[i] = kNoStateId; in Clear()
361 front_ = 0; in Clear()
365 StateId front_;
390 : QueueBase<S>(STATE_ORDER_QUEUE), front_(0), back_(kNoStateId) {} in StateOrderQueue()
392 StateId Head() const { return front_; } in Head()
395 if (front_ > back_) front_ = back_ = s; in Enqueue()
397 else if (s < front_) front_ = s; in Enqueue()
403 enqueued_[front_] = false; in Dequeue()
404 while ((front_ <= back_) && (enqueued_[front_] == false)) ++front_; in Dequeue()
409 bool Empty() const { return front_ > back_; } in Empty()
412 for (StateId i = front_; i <= back_; ++i) enqueued_[i] = false; in Clear()
413 front_ = 0; in Clear()
418 StateId front_;
448 : QueueBase<S>(SCC_QUEUE), queue_(queue), scc_(scc), front_(0), in SccQueue()
452 while ((front_ <= back_) && in Head()
453 (((*queue_)[front_] && (*queue_)[front_]->Empty()) in Head()
454 || (((*queue_)[front_] == 0) && in Head()
455 ((front_ >= trivial_queue_.size()) in Head()
456 || (trivial_queue_[front_] == kNoStateId))))) in Head()
457 ++front_; in Head()
458 if ((*queue_)[front_]) in Head()
459 return (*queue_)[front_]->Head(); in Head()
461 return trivial_queue_[front_]; in Head()
465 if (front_ > back_) front_ = back_ = scc_[s]; in Enqueue()
467 else if (scc_[s] < front_) front_ = scc_[s]; in Enqueue()
478 if ((*queue_)[front_]) in Dequeue()
479 (*queue_)[front_]->Dequeue(); in Dequeue()
480 else if (front_ < trivial_queue_.size()) in Dequeue()
481 trivial_queue_[front_] = kNoStateId; in Dequeue()
490 if (front_ < back_) // Queue scc # back_ not empty unless back_==front_ in Empty()
492 else if (front_ > back_) in Empty()
494 else if ((*queue_)[front_]) in Empty()
495 return (*queue_)[front_]->Empty(); in Empty()
497 return (front_ >= trivial_queue_.size()) in Empty()
498 || (trivial_queue_[front_] == kNoStateId); in Empty()
502 for (StateId i = front_; i <= back_; ++i) in Clear()
507 front_ = 0; in Clear()
514 mutable StateId front_; variable