src/main/java/thinkd/ThinkDAcc.java
/**
     * Remove an edge from the samples
     * @param src source node of the given edge
     * @param dst destination node of the given edge
     */
Remove an edge from the samples
@param src source node of the given edge
@param dst destination node of the given edge
Remove an edge from the samples @param src source node of the given edge @param dst destination node of the given edge
private void deleteEdge(int src, int dst) {
        int sampleNum = edgeToIndex.size();
        long key = ((long)src * Integer.MAX_VALUE) + dst;
        int index = edgeToIndex.remove(key);
        IntOpenHashSet map = srcToDsts.get(src);
        map.remove(dst);
        if(map.isEmpty()) {
            srcToDsts.remove(src);
        }
        map = srcToDsts.get(dst);
        map.remove(src);
        if(map.isEmpty()) {
            srcToDsts.remove(dst);
        }
        if(index < sampleNum - 1) {
            int newSrc = samples[0][index] = samples[0][sampleNum - 1];
            int newDst = samples[1][index] = samples[1][sampleNum - 1];
            long newKey = ((long) newSrc * Integer.MAX_VALUE) + newDst;
            edgeToIndex.put(newKey, index);
        }
    }
private void deleteEdge ( int src , int dst ) { int sampleNum = edgeToIndex . size ( ) ; long key = ( ( long ) src * Integer . MAX_VALUE ) + dst ; int index = edgeToIndex . remove ( key ) ; IntOpenHashSet map = srcToDsts . get ( src ) ; map . remove ( dst ) ; if ( map . isEmpty ( ) ) { srcToDsts . remove ( src ) ; } map = srcToDsts . get ( dst ) ; map . remove ( src ) ; if ( map . isEmpty ( ) ) { srcToDsts . remove ( dst ) ; } if ( index < sampleNum - 1 ) { int newSrc = samples [ 0 ] [ index ] = samples [ 0 ] [ sampleNum - 1 ] ; int newDst = samples [ 1 ] [ index ] = samples [ 1 ] [ sampleNum - 1 ] ; long newKey = ( ( long ) newSrc * Integer . MAX_VALUE ) + newDst ; edgeToIndex . put ( newKey , index ) ; } }
Remove an edge from the samples
 @param src source node of the given edge
 @param dst destination node of the given edge
Remove an edge from the samples @param src source node of the given edge @param dst destination node of the given edge