public Graph < K , VV , EV > filterOnVertices ( FilterFunction < Vertex < K , VV > > vertexFilter ) { DataSet < Vertex < K , VV > > filteredVertices = this . vertices . filter ( vertexFilter ) ; DataSet < Edge < K , EV > > remainingEdges = this . edges . join ( filteredVertices ) . where ( 0 ) . equalTo ( 0 ) . with ( new ProjectEdge <> ( ) ) . join ( filteredVertices ) . where ( 1 ) . equalTo ( 0 ) . with ( new ProjectEdge <> ( ) ) . name ( "Filter on vertices" ) ; return new Graph <> ( filteredVertices , remainingEdges , this . context ) ; }
Apply a filtering function to the graph and return a sub - graph that satisfies the predicates only for the vertices .