src/Edge.cpp
/**
 * The whole reason for storing edges in a hash table is that it
 * makes this function fairly efficient.  When I want to find a
 * particular edge leading out of a particular node, I call this
 * function.  It locates the edge in the hash table, and returns
 * a copy of it.  If the edge is not found, the edge that is returned
 * to the caller will have start_node set to -1, which is the value
 * used in the hash table to flag an unused entry.
*/
The whole reason for storing edges in a hash table is that it
makes this function fairly efficient.  When I want to find a
particular edge leading out of a particular node, I call this
function.  It locates the edge in the hash table, and returns
a copy of it.  If the edge is not found, the edge that is returned
to the caller will have start_node set to -1, which is the value
used in the hash table to flag an unused entry.
The whole reason for storing edges in a hash table is that it makes this function fairly efficient . When I want to find a particular edge leading out of a particular node I call this function . It locates the edge in the hash table and returns a copy of it . If the edge is not found the edge that is returned to the caller will have start_node set to - 1 which is the value used in the hash table to flag an unused entry .
Edge Edge::Find(int node, int c) {
    int i = Hash(node, c);
    for (; ;) {
        if (Edges[i].start_node == node) if (c == Sequence[Edges[i].first_char_index])
            return Edges[i];
        if (Edges[i].start_node == -1)
            return Edges[i];
        i = ++i % HASH_TABLE_SIZE;
    }
}
Edge Edge :: Find ( int node , int c ) { int i = Hash ( node , c ) ; for ( ; ; ) { if ( Edges [ i ] . start_node == node ) if ( c == Sequence [ Edges [ i ] . first_char_index ] ) return Edges [ i ] ; if ( Edges [ i ] . start_node == -1 ) return Edges [ i ] ; i = ++ i % HASH_TABLE_SIZE ; } }
The whole reason for storing edges in a hash table is that it
 makes this function fairly efficient.
The whole reason for storing edges in a hash table is that it makes this function fairly efficient .