Exemplo n.º 1
0
bool
EdgeRetrieverBin::
next()
{
#ifdef DEBUG_EDGER
    log_os << "EDGER: start next hc: " << _headCount << "\n";
#endif

    if (_headCount >= _endCount) return false;

    // first catch headCount up to the begin edge if required:
    if (_headCount < _beginCount)
    {
        jumpToFirstEdge();
#ifdef DEBUG_EDGER
        log_os << "EDGER: jumped hc: " << _headCount << " " << _edge  << "\n";
#endif
    }
    else
    {
        advanceEdge();
#ifdef DEBUG_EDGER
        log_os << "EDGER: advanced hc: " << _headCount << " " << _edge  << "\n";
#endif
    }

    assert(_headCount >= _beginCount);
    return (_headCount <= _endCount);
}
Exemplo n.º 2
0
bool
EdgeRetrieverJumpBin::
next()
{
#ifdef DEBUG_EDGER
    log_os << "EDGER: start index: " << _edgeIndex << "\n";
#endif

    if (_edge.locusIndex >= _set.size()) return false;

    advanceEdge();
#ifdef DEBUG_EDGER
    log_os << "EDGER: advanced index: " << _edgeIndex << " " << _edge  << "\n";
#endif

    return (_edge.locusIndex < _set.size());
}