public Graph < K , NullValue , EV > intersect ( Graph < K , VV , EV > graph , boolean distinctEdges ) { DataSet < Edge < K , EV > > intersectEdges ; if ( distinctEdges ) { intersectEdges = getDistinctEdgeIntersection ( graph . getEdges ( ) ) ; } else { intersectEdges = getPairwiseEdgeIntersection ( graph . getEdges ( ) ) ; } return Graph . fromDataSet ( intersectEdges , getContext ( ) ) ; }
Performs intersect on the edge sets of the input graphs . Edges are considered equal if they have the same source identifier target identifier and edge value .