src/Edge.cpp
/* *
 * Removes edge from hashtable(Eges). When edge is removed, all gaps need to be
 * translated forward so other edges can be found using Find method.
 */
Removes edge from hashtable. When edge is removed, all gaps need to be
translated forward so other edges can be found using Find method.
Removes edge from hashtable . When edge is removed all gaps need to be translated forward so other edges can be found using Find method .
void Edge::Remove() {
    int i = Hash(start_node, Sequence[first_char_index]);
    while (Edges[i].start_node != start_node ||
           Edges[i].first_char_index != first_char_index)
        i = ++i % HASH_TABLE_SIZE;
    for (; ;) {
        Edges[i].start_node = -1;
        int j = i;
        for (; ;) {
            i = ++i % HASH_TABLE_SIZE;
            if (Edges[i].start_node == -1)
                return;
            int r = Hash(Edges[i].start_node, Sequence[Edges[i].first_char_index]);
            if (i >= r && r > j)
                continue;
            if (r > j && j > i)
                continue;
            if (j > i && i >= r)
                continue;
            break;
        }
        Edges[j] = Edges[i];
    }
}
void Edge :: Remove ( ) { int i = Hash ( start_node , Sequence [ first_char_index ] ) ; while ( Edges [ i ] . start_node != start_node || Edges [ i ] . first_char_index != first_char_index ) i = ++ i % HASH_TABLE_SIZE ; for ( ; ; ) { Edges [ i ] . start_node = -1 ; int j = i ; for ( ; ; ) { i = ++ i % HASH_TABLE_SIZE ; if ( Edges [ i ] . start_node == -1 ) return ; int r = Hash ( Edges [ i ] . start_node , Sequence [ Edges [ i ] . first_char_index ] ) ; if ( i >= r && r > j ) continue ; if ( r > j && j > i ) continue ; if ( j > i && i >= r ) continue ; break ; } Edges [ j ] = Edges [ i ] ; } }
Removes edge from hashtable(Eges).
Removes edge from hashtable ( Eges ) .