src/main/java/thinkd/ThinkDFast.java
/**
     * Store a sampled edge
     * @param src source node of the given edge
     * @param dst destination node of the given edge
     */
Store a sampled edge
@param src source node of the given edge
@param dst destination node of the given edge
Store a sampled edge @param src source node of the given edge @param dst destination node of the given edge
private void addEdge(final int src, final int dst) {
        if(!srcToDsts.containsKey(src)) {
            srcToDsts.put(src, new IntOpenHashSet());
        }
        srcToDsts.get(src).add(dst);
        if(!srcToDsts.containsKey(dst)) {
            srcToDsts.put(dst, new IntOpenHashSet());
        }
        srcToDsts.get(dst).add(src);
    }
private void addEdge ( final int src , final int dst ) { if ( ! srcToDsts . containsKey ( src ) ) { srcToDsts . put ( src , new IntOpenHashSet ( ) ) ; } srcToDsts . get ( src ) . add ( dst ) ; if ( ! srcToDsts . containsKey ( dst ) ) { srcToDsts . put ( dst , new IntOpenHashSet ( ) ) ; } srcToDsts . get ( dst ) . add ( src ) ; }
Store a sampled edge
 @param src source node of the given edge
 @param dst destination node of the given edge
Store a sampled edge @param src source node of the given edge @param dst destination node of the given edge