src/main/java/thinkd/ThinkDAcc.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(int src, int dst) {
        int sampleNum = edgeToIndex.size();
        samples[0][sampleNum] = src;
        samples[1][sampleNum] = dst;
        long key = ((long)src * Integer.MAX_VALUE) + dst;
        edgeToIndex.put(key, sampleNum);
        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 ( int src , int dst ) { int sampleNum = edgeToIndex . size ( ) ; samples [ 0 ] [ sampleNum ] = src ; samples [ 1 ] [ sampleNum ] = dst ; long key = ( ( long ) src * Integer . MAX_VALUE ) + dst ; edgeToIndex . put ( key , sampleNum ) ; 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