public static boolean isInSSSP ( final Edge < Long , Double > edgeToBeRemoved , DataSet < Edge < Long , Double > > edgesInSSSP ) throws Exception { return edgesInSSSP . filter ( new FilterFunction < Edge < Long , Double > > ( ) { @ Override public boolean filter ( Edge < Long , Double > edge ) throws Exception { return edge . equals ( edgeToBeRemoved ) ; } } ) . count ( ) > 0 ; }
Function that verifies whether the edge to be removed is part of the SSSP or not . If it is the src vertex will be invalidated .