private DataSet < Edge < K , EV > > getDistinctEdgeIntersection ( DataSet < Edge < K , EV > > edges ) { return this . getEdges ( ) . join ( edges ) . where ( 0 , 1 , 2 ) . equalTo ( 0 , 1 , 2 ) . with ( new JoinFunction < Edge < K , EV > , Edge < K , EV > , Edge < K , EV > > ( ) { @ Override public Edge < K , EV > join ( Edge < K , EV > first , Edge < K , EV > second ) throws Exception { return first ; } } ) . withForwardedFieldsFirst ( "*" ) . name ( "Intersect edges" ) . distinct ( ) . name ( "Edges" ) ; }
Computes the intersection between the edge set and the given edge set . For all matching pairs only one edge will be in the resulting data set .