GitHub PullRequestReviewCommentEvent at 2014-01-27 17:52:26
Repository: incubator-spark
Actor: jegonzal
Payload: {"comment":{"url":"https://api.github.com/repos/apache/incubator-spark/pulls/comments/9197991","id":9197991,"diff_hunk":"@@ -209,6 +241,401 @@ class GraphOps[VD: ClassTag, ED: ClassTag](graph: Graph[VD, ED]) extends Seriali\n     graph.mask(preprocess(graph).subgraph(epred, vpred))\n   }\n \n+ /**\n+   * Filters the edges of the graph by keeping only the edges that satisfy the\n+   * given predicate. The predicate takes as input the src and destination vertex ids and values.\n+   *\n+   * @param epred the edge predicate\n+   */\n+  def filterEdges(epred: EdgeTriplet[VD, ED] => Boolean): Graph[VD, ED] = {\n+    graph.subgraph(epred, (vid, vval) => true)\n+  }\n+\n+  /**\n+   * Filters the vertices of the graph by keeping only the vertices that satisfy the\n+   * given predicate. The predicate takes as input the vertex id and vertex value.\n+   *\n+   * @param vpred the vertex predicate\n+   */\n+  def filterVertices(vpred: (VertexId, VD) => Boolean): Graph[VD, ED] = {","path":"graphx/src/main/scala/org/apache/spark/graphx/GraphOps.scala","position":72,"original_position":72,"commit_id":"726f1b22ed9be85bae41e74dad16d872262644b6","original_commit_id":"726f1b22ed9be85bae41e74dad16d872262644b6","user":{"login":"jegonzal","id":2350086,"avatar_url":"https://gravatar.com/avatar/af7357d1b246d58a71cc4d5aba43e546?d=https%3A%2F%2Fidenticons.github.com%2F1610b86ad8c41fa0e2c830ef997819f2.png&r=x","gravatar_id":"af7357d1b246d58a71cc4d5aba43e546","url":"https://api.github.com/users/jegonzal","html_url":"https://github.com/jegonzal","followers_url":"https://api.github.com/users/jegonzal/followers","following_url":"https://api.github.com/users/jegonzal/following{/other_user}","gists_url":"https://api.github.com/users/jegonzal/gists{/gist_id}","starred_url":"https://api.github.com/users/jegonzal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jegonzal/subscriptions","organizations_url":"https://api.github.com/users/jegonzal/orgs","repos_url":"https://api.github.com/users/jegonzal/repos","events_url":"https://api.github.com/users/jegonzal/events{/privacy}","received_events_url":"https://api.github.com/users/jegonzal/received_events","type":"User","site_admin":false},"body":"See discussion on `filterEdges`","created_at":"2014-01-27T17:52:26Z","updated_at":"2014-01-27T17:52:26Z","html_url":"https://github.com/apache/incubator-spark/pull/457#discussion_r9197991","pull_request_url":"https://api.github.com/repos/apache/incubator-spark/pulls/457","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-spark/pulls/comments/9197991"},"html":{"href":"https://github.com/apache/incubator-spark/pull/457#discussion_r9197991"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-spark/pulls/457"}}}}