I have a question specifically regarding these two lines:
|
if (interval == begin(intervals)) intervals.emplace_front(order); // create a new interval if there is no interval with higher priority |
|
pop_front(interval--); // move it to the 'next' interval with higher priority and remove it from its previous interval |
If there is no earlier interval, we create a new one (and move the neighbor into it).
However, if there is an earlier interval, I do not understand why we do not need to create a new interval anyway, when we first remove a neighbor from the interval currently containing the neighbor.
In Wikipedia words (
https://en.wikipedia.org/wiki/Lexicographic_breadth-first_search), it seems to me that we do not necessarily create a new "T", the first time we remove a neighbor from "S".
Is there some trick that I am missing?
I have a question specifically regarding these two lines:
LexBFS/src/lexbfs.hpp
Lines 50 to 51 in 41f86fe
If there is no earlier interval, we create a new one (and move the neighbor into it).
However, if there is an earlier interval, I do not understand why we do not need to create a new interval anyway, when we first remove a neighbor from the interval currently containing the neighbor.
In Wikipedia words (https://en.wikipedia.org/wiki/Lexicographic_breadth-first_search), it seems to me that we do not necessarily create a new "T", the first time we remove a neighbor from "S".
Is there some trick that I am missing?