public Graph < KT , VVT , Tuple2 < EV , EV > > projectionTopSimple ( ) { DataSet < Edge < KT , Tuple2 < EV , EV > > > newEdges = edges . join ( edges ) . where ( 1 ) . equalTo ( 1 ) . with ( new ProjectionTopSimple <> ( ) ) . name ( "Simple top projection" ) ; return Graph . fromDataSet ( topVertices , newEdges , context ) ; }
Convert a bipartite graph into an undirected graph that contains only top vertices . An edge between two vertices in the new graph will exist only if the original bipartite graph contains a bottom vertex they are both connected to .