src/main/java/thinkd/ThinkDSpot.java
/**
     * Process an edge with a timestamp
     * @param src source node of the given edge
     * @param dst destination node of the given edge
     * @param timestamp timestamp of the edge in milliseconds
     * @return whether the current estimated count of global triangle exceeds the given threshold
     */
Process an edge with a timestamp
@param src source node of the given edge
@param dst destination node of the given edge
@param timestamp timestamp of the edge in milliseconds
@return whether the current estimated count of global triangle exceeds the given threshold
Process an edge with a timestamp @param src source node of the given edge @param dst destination node of the given edge @param timestamp timestamp of the edge in milliseconds @return whether the current estimated count of global triangle exceeds the given threshold
public boolean process(int src, int dst, long timestamp) {
        while(!deleteQueue.isEmpty() && deleteQueue.peek().getKey() <= timestamp) {
            Pair<Long, int[]> pair = deleteQueue.poll();
            int[] entryToDelete = pair.getValue();
            module.processEdge(entryToDelete[0], entryToDelete[1], false);
        }
        module.processEdge(src, dst, true);
        deleteQueue.add(new Pair<Long, int[]>(timestamp + timeWindow, new int[]{src, dst}));
        return module.getGlobalTriangle() > threshold;
    }
public boolean process ( int src , int dst , long timestamp ) { while ( ! deleteQueue . isEmpty ( ) && deleteQueue . peek ( ) . getKey ( ) <= timestamp ) { Pair < Long , int [ ] > pair = deleteQueue . poll ( ) ; int [ ] entryToDelete = pair . getValue ( ) ; module . processEdge ( entryToDelete [ 0 ] , entryToDelete [ 1 ] , false ) ; } module . processEdge ( src , dst , true ) ; deleteQueue . add ( new Pair < Long , int [ ] > ( timestamp + timeWindow , new int [ ] { src , dst } ) ) ; return module . getGlobalTriangle ( ) > threshold ; }
Process an edge with a timestamp
 @param src source node of the given edge
 @param dst destination node of the given edge
 @param timestamp timestamp of the edge in milliseconds
 @return whether the current estimated count of global triangle exceeds the given threshold
Process an edge with a timestamp @param src source node of the given edge @param dst destination node of the given edge @param timestamp timestamp of the edge in milliseconds @return whether the current estimated count of global triangle exceeds the given threshold