<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Wed Sep 16 10:26:31 PDT 2015 -->
<title>GraphOps</title>
<meta name="date" content="2015-09-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GraphOps";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/spark/graphx/GraphLoader.html" title="class in org.apache.spark.graphx"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/spark/graphx/GraphXUtils.html" title="class in org.apache.spark.graphx"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/spark/graphx/GraphOps.html" target="_top">Frames</a></li>
<li><a href="GraphOps.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.spark.graphx</div>
<h2 title="Class GraphOps" class="title">Class GraphOps<VD,ED></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.spark.graphx.GraphOps<VD,ED></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">GraphOps<VD,ED></span>
extends java.lang.Object
implements scala.Serializable</pre>
<div class="block">Contains additional functionality for <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx"><code>Graph</code></a>. All operations are expressed in terms of the
efficient GraphX API. This class is implicitly constructed for each Graph object.
<p></div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../serialized-form.html#org.apache.spark.graphx.GraphOps">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#GraphOps(org.apache.spark.graphx.Graph, scala.reflect.ClassTag, scala.reflect.ClassTag)">GraphOps</a></strong>(<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> graph,
scala.reflect.ClassTag<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> evidence$1,
scala.reflect.ClassTag<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> evidence$2)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><<a href="../../../../org/apache/spark/graphx/Edge.html" title="class in org.apache.spark.graphx">Edge</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>[]></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#collectEdges(org.apache.spark.graphx.EdgeDirection)">collectEdges</a></strong>(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</code>
<div class="block">Returns an RDD that contains for each vertex v its local edges,
i.e., the edges that are incident on v, in the user-specified direction.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><long[]></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#collectNeighborIds(org.apache.spark.graphx.EdgeDirection)">collectNeighborIds</a></strong>(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</code>
<div class="block">Collect the neighbor vertex ids for each vertex.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>>[]></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#collectNeighbors(org.apache.spark.graphx.EdgeDirection)">collectNeighbors</a></strong>(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</code>
<div class="block">Collect the neighbor vertex attributes for each vertex.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#connectedComponents()">connectedComponents</a></strong>()</code>
<div class="block">Compute the connected component membership of each vertex and return a graph with the vertex
value containing the lowest vertex id in the connected component containing that vertex.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#convertToCanonicalEdges(scala.Function2)">convertToCanonicalEdges</a></strong>(scala.Function2<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> mergeFunc)</code>
<div class="block">Convert bi-directional edges into uni-directional ones.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#degrees()">degrees</a></strong>()</code>
<div class="block">The degree of each vertex in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><VD2,ED2> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#filter(scala.Function1, scala.Function1, scala.Function2, scala.reflect.ClassTag, scala.reflect.ClassTag)">filter</a></strong>(scala.Function1<<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>,<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><VD2,ED2>> preprocess,
scala.Function1<<a href="../../../../org/apache/spark/graphx/EdgeTriplet.html" title="class in org.apache.spark.graphx">EdgeTriplet</a><VD2,ED2>,java.lang.Object> epred,
scala.Function2<java.lang.Object,VD2,java.lang.Object> vpred,
scala.reflect.ClassTag<VD2> evidence$4,
scala.reflect.ClassTag<ED2> evidence$5)</code>
<div class="block">Filter the graph by computing some values to filter on, and applying the predicates.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#inDegrees()">inDegrees</a></strong>()</code>
<div class="block">The in-degree of each vertex in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><U> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#joinVertices(org.apache.spark.rdd.RDD, scala.Function3, scala.reflect.ClassTag)">joinVertices</a></strong>(<a href="../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,U>> table,
scala.Function3<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,U,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> mapFunc,
scala.reflect.ClassTag<U> evidence$3)</code>
<div class="block">Join the vertices with an RDD and then apply a function from the
vertex and RDD entry to a new vertex value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#numEdges()">numEdges</a></strong>()</code>
<div class="block">The number of edges in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#numVertices()">numVertices</a></strong>()</code>
<div class="block">The number of vertices in the graph.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#outDegrees()">outDegrees</a></strong>()</code>
<div class="block">The out-degree of each vertex in the graph.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#pageRank(double, double)">pageRank</a></strong>(double tol,
double resetProb)</code>
<div class="block">Run a dynamic version of PageRank returning a graph with vertex attributes containing the
PageRank and edge attributes containing the normalized edge weight.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#personalizedPageRank(long, double, double)">personalizedPageRank</a></strong>(long src,
double tol,
double resetProb)</code>
<div class="block">Run personalized PageRank for a given vertex, such that all random walks
are started relative to the source node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#pickRandomVertex()">pickRandomVertex</a></strong>()</code>
<div class="block">Picks a random vertex from the graph and returns its ID.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><A> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#pregel(A, int, org.apache.spark.graphx.EdgeDirection, scala.Function3, scala.Function1, scala.Function2, scala.reflect.ClassTag)">pregel</a></strong>(A initialMsg,
int maxIterations,
<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> activeDirection,
scala.Function3<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,A,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> vprog,
scala.Function1<<a href="../../../../org/apache/spark/graphx/EdgeTriplet.html" title="class in org.apache.spark.graphx">EdgeTriplet</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>,scala.collection.Iterator<scala.Tuple2<java.lang.Object,A>>> sendMsg,
scala.Function2<A,A,A> mergeMsg,
scala.reflect.ClassTag<A> evidence$6)</code>
<div class="block">Execute a Pregel-like iterative vertex-parallel abstraction.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#staticPageRank(int, double)">staticPageRank</a></strong>(int numIter,
double resetProb)</code>
<div class="block">Run PageRank for a fixed number of iterations returning a graph with vertex attributes
containing the PageRank and edge attributes the normalized edge weight.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#staticPersonalizedPageRank(long, int, double)">staticPersonalizedPageRank</a></strong>(long src,
int numIter,
double resetProb)</code>
<div class="block">Run Personalized PageRank for a fixed number of iterations with
with all iterations originating at the source node
returning a graph with vertex attributes
containing the PageRank and edge attributes the normalized edge weight.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#stronglyConnectedComponents(int)">stronglyConnectedComponents</a></strong>(int numIter)</code>
<div class="block">Compute the strongly connected component (SCC) of each vertex and return a graph with the
vertex value containing the lowest vertex id in the SCC containing that vertex.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/spark/graphx/GraphOps.html#triangleCount()">triangleCount</a></strong>()</code>
<div class="block">Compute the number of triangles passing through each vertex.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="GraphOps(org.apache.spark.graphx.Graph, scala.reflect.ClassTag, scala.reflect.ClassTag)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>GraphOps</h4>
<pre>public GraphOps(<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> graph,
scala.reflect.ClassTag<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> evidence$1,
scala.reflect.ClassTag<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> evidence$2)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="numEdges()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numEdges</h4>
<pre>public long numEdges()</pre>
<div class="block">The number of edges in the graph.</div>
</li>
</ul>
<a name="numVertices()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>numVertices</h4>
<pre>public long numVertices()</pre>
<div class="block">The number of vertices in the graph.</div>
</li>
</ul>
<a name="inDegrees()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>inDegrees</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object> inDegrees()</pre>
<div class="block">The in-degree of each vertex in the graph.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="outDegrees()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>outDegrees</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object> outDegrees()</pre>
<div class="block">The out-degree of each vertex in the graph.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="degrees()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>degrees</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><java.lang.Object> degrees()</pre>
<div class="block">The degree of each vertex in the graph.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="collectNeighborIds(org.apache.spark.graphx.EdgeDirection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collectNeighborIds</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><long[]> collectNeighborIds(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</pre>
<div class="block">Collect the neighbor vertex ids for each vertex.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edgeDirection</code> - the direction along which to collect
neighboring vertices
<p></dd>
<dt><span class="strong">Returns:</span></dt><dd>the set of neighboring ids for each vertex</dd></dl>
</li>
</ul>
<a name="collectNeighbors(org.apache.spark.graphx.EdgeDirection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collectNeighbors</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><scala.Tuple2<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>>[]> collectNeighbors(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</pre>
<div class="block">Collect the neighbor vertex attributes for each vertex.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edgeDirection</code> - the direction along which to collect
neighboring vertices
<p></dd>
<dt><span class="strong">Returns:</span></dt><dd>the vertex set of neighboring vertex attributes for each vertex</dd></dl>
</li>
</ul>
<a name="collectEdges(org.apache.spark.graphx.EdgeDirection)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collectEdges</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/VertexRDD.html" title="class in org.apache.spark.graphx">VertexRDD</a><<a href="../../../../org/apache/spark/graphx/Edge.html" title="class in org.apache.spark.graphx">Edge</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>[]> collectEdges(<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> edgeDirection)</pre>
<div class="block">Returns an RDD that contains for each vertex v its local edges,
i.e., the edges that are incident on v, in the user-specified direction.
Warning: note that singleton vertices, those with no edges in the given
direction will not be part of the return value.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>edgeDirection</code> - the direction along which to collect
the local edges of vertices
<p></dd>
<dt><span class="strong">Returns:</span></dt><dd>the local edges for each vertex</dd></dl>
</li>
</ul>
<a name="joinVertices(org.apache.spark.rdd.RDD, scala.Function3, scala.reflect.ClassTag)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>joinVertices</h4>
<pre>public <U> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> joinVertices(<a href="../../../../org/apache/spark/rdd/RDD.html" title="class in org.apache.spark.rdd">RDD</a><scala.Tuple2<java.lang.Object,U>> table,
scala.Function3<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,U,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> mapFunc,
scala.reflect.ClassTag<U> evidence$3)</pre>
<div class="block">Join the vertices with an RDD and then apply a function from the
vertex and RDD entry to a new vertex value. The input table
should contain at most one entry for each vertex. If no entry is
provided the map function is skipped and the old value is used.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>table</code> - the table to join with the vertices in the graph.
The table should contain at most one entry for each vertex.</dd><dd><code>mapFunc</code> - the function used to compute the new vertex
values. The map function is invoked only for vertices with a
corresponding entry in the table otherwise the old vertex value
is used.
<p></dd><dd><code>evidence$3</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="filter(scala.Function1, scala.Function1, scala.Function2, scala.reflect.ClassTag, scala.reflect.ClassTag)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>filter</h4>
<pre>public <VD2,ED2> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> filter(scala.Function1<<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>,<a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><VD2,ED2>> preprocess,
scala.Function1<<a href="../../../../org/apache/spark/graphx/EdgeTriplet.html" title="class in org.apache.spark.graphx">EdgeTriplet</a><VD2,ED2>,java.lang.Object> epred,
scala.Function2<java.lang.Object,VD2,java.lang.Object> vpred,
scala.reflect.ClassTag<VD2> evidence$4,
scala.reflect.ClassTag<ED2> evidence$5)</pre>
<div class="block">Filter the graph by computing some values to filter on, and applying the predicates.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>preprocess</code> - a function to compute new vertex and edge data before filtering</dd><dd><code>epred</code> - edge pred to filter on after preprocess, see more details under
<a href="../../../../org/apache/spark/graphx/Graph.html#subgraph(scala.Function1, scala.Function2)"><code>Graph.subgraph(scala.Function1<org.apache.spark.graphx.EdgeTriplet<VD, ED>, java.lang.Object>, scala.Function2<java.lang.Object, VD, java.lang.Object>)</code></a></dd><dd><code>vpred</code> - vertex pred to filter on after prerocess, see more details under
<a href="../../../../org/apache/spark/graphx/Graph.html#subgraph(scala.Function1, scala.Function2)"><code>Graph.subgraph(scala.Function1<org.apache.spark.graphx.EdgeTriplet<VD, ED>, java.lang.Object>, scala.Function2<java.lang.Object, VD, java.lang.Object>)</code></a></dd><dd><code>evidence$4</code> - (undocumented)</dd><dd><code>evidence$5</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>a subgraph of the orginal graph, with its data unchanged
<p></dd></dl>
</li>
</ul>
<a name="pickRandomVertex()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pickRandomVertex</h4>
<pre>public long pickRandomVertex()</pre>
<div class="block">Picks a random vertex from the graph and returns its ID.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd></dl>
</li>
</ul>
<a name="convertToCanonicalEdges(scala.Function2)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>convertToCanonicalEdges</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> convertToCanonicalEdges(scala.Function2<<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> mergeFunc)</pre>
<div class="block">Convert bi-directional edges into uni-directional ones.
Some graph algorithms (e.g., TriangleCount) assume that an input graph
has its edges in canonical direction.
This function rewrites the vertex ids of edges so that srcIds are bigger
than dstIds, and merges the duplicated edges.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>mergeFunc</code> - the user defined reduce function which should
be commutative and associative and is used to combine the output
of the map phase
<p></dd>
<dt><span class="strong">Returns:</span></dt><dd>the resulting graph with canonical edges</dd></dl>
</li>
</ul>
<a name="pregel(java.lang.Object,int,org.apache.spark.graphx.EdgeDirection,scala.Function3,scala.Function1,scala.Function2,scala.reflect.ClassTag)">
<!-- -->
</a><a name="pregel(A, int, org.apache.spark.graphx.EdgeDirection, scala.Function3, scala.Function1, scala.Function2, scala.reflect.ClassTag)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pregel</h4>
<pre>public <A> <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> pregel(A initialMsg,
int maxIterations,
<a href="../../../../org/apache/spark/graphx/EdgeDirection.html" title="class in org.apache.spark.graphx">EdgeDirection</a> activeDirection,
scala.Function3<java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,A,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>> vprog,
scala.Function1<<a href="../../../../org/apache/spark/graphx/EdgeTriplet.html" title="class in org.apache.spark.graphx">EdgeTriplet</a><<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">VD</a>,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>>,scala.collection.Iterator<scala.Tuple2<java.lang.Object,A>>> sendMsg,
scala.Function2<A,A,A> mergeMsg,
scala.reflect.ClassTag<A> evidence$6)</pre>
<div class="block">Execute a Pregel-like iterative vertex-parallel abstraction. The
user-defined vertex-program <code>vprog</code> is executed in parallel on
each vertex receiving any inbound messages and computing a new
value for the vertex. The <code>sendMsg</code> function is then invoked on
all out-edges and is used to compute an optional message to the
destination vertex. The <code>mergeMsg</code> function is a commutative
associative function used to combine messages destined to the
same vertex.
<p>
On the first iteration all vertices receive the <code>initialMsg</code> and
on subsequent iterations if a vertex does not receive a message
then the vertex-program is not invoked.
<p>
This function iterates until there are no remaining messages, or
for <code>maxIterations</code> iterations.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>initialMsg</code> - the message each vertex will receive at the on
the first iteration
<p></dd><dd><code>maxIterations</code> - the maximum number of iterations to run for
<p></dd><dd><code>activeDirection</code> - the direction of edges incident to a vertex that received a message in
the previous round on which to run <code>sendMsg</code>. For example, if this is <code>EdgeDirection.Out</code>, only
out-edges of vertices that received a message in the previous round will run.
<p></dd><dd><code>vprog</code> - the user-defined vertex program which runs on each
vertex and receives the inbound message and computes a new vertex
value. On the first iteration the vertex program is invoked on
all vertices and is passed the default message. On subsequent
iterations the vertex program is only invoked on those vertices
that receive messages.
<p></dd><dd><code>sendMsg</code> - a user supplied function that is applied to out
edges of vertices that received messages in the current
iteration
<p></dd><dd><code>mergeMsg</code> - a user supplied function that takes two incoming
messages of type A and merges them into a single message of type
A. ''This function must be commutative and associative and
ideally the size of A should not increase.''
<p></dd><dd><code>evidence$6</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>the resulting graph at the end of the computation
<p></dd></dl>
</li>
</ul>
<a name="pageRank(double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pageRank</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object> pageRank(double tol,
double resetProb)</pre>
<div class="block">Run a dynamic version of PageRank returning a graph with vertex attributes containing the
PageRank and edge attributes containing the normalized edge weight.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>tol</code> - (undocumented)</dd><dd><code>resetProb</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>PageRank$.runUntilConvergence(org.apache.spark.graphx.Graph<VD, ED>, double, double, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="personalizedPageRank(long, double, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>personalizedPageRank</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object> personalizedPageRank(long src,
double tol,
double resetProb)</pre>
<div class="block">Run personalized PageRank for a given vertex, such that all random walks
are started relative to the source node.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>src</code> - (undocumented)</dd><dd><code>tol</code> - (undocumented)</dd><dd><code>resetProb</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>PageRank$.runUntilConvergenceWithOptions(org.apache.spark.graphx.Graph<VD, ED>, double, double, scala.Option<java.lang.Object>, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="staticPersonalizedPageRank(long, int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>staticPersonalizedPageRank</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object> staticPersonalizedPageRank(long src,
int numIter,
double resetProb)</pre>
<div class="block">Run Personalized PageRank for a fixed number of iterations with
with all iterations originating at the source node
returning a graph with vertex attributes
containing the PageRank and edge attributes the normalized edge weight.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>src</code> - (undocumented)</dd><dd><code>numIter</code> - (undocumented)</dd><dd><code>resetProb</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>PageRank$.runWithOptions(org.apache.spark.graphx.Graph<VD, ED>, int, double, scala.Option<java.lang.Object>, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="staticPageRank(int, double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>staticPageRank</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,java.lang.Object> staticPageRank(int numIter,
double resetProb)</pre>
<div class="block">Run PageRank for a fixed number of iterations returning a graph with vertex attributes
containing the PageRank and edge attributes the normalized edge weight.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numIter</code> - (undocumented)</dd><dd><code>resetProb</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>PageRank$.run(org.apache.spark.graphx.Graph<VD, ED>, int, double, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="connectedComponents()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connectedComponents</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> connectedComponents()</pre>
<div class="block">Compute the connected component membership of each vertex and return a graph with the vertex
value containing the lowest vertex id in the connected component containing that vertex.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>ConnectedComponents$.run(org.apache.spark.graphx.Graph<VD, ED>, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="triangleCount()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>triangleCount</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> triangleCount()</pre>
<div class="block">Compute the number of triangles passing through each vertex.
<p></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>TriangleCount$.run(org.apache.spark.graphx.Graph<VD, ED>, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
<a name="stronglyConnectedComponents(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stronglyConnectedComponents</h4>
<pre>public <a href="../../../../org/apache/spark/graphx/Graph.html" title="class in org.apache.spark.graphx">Graph</a><java.lang.Object,<a href="../../../../org/apache/spark/graphx/GraphOps.html" title="type parameter in GraphOps">ED</a>> stronglyConnectedComponents(int numIter)</pre>
<div class="block">Compute the strongly connected component (SCC) of each vertex and return a graph with the
vertex value containing the lowest vertex id in the SCC containing that vertex.
<p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>numIter</code> - (undocumented)</dd>
<dt><span class="strong">Returns:</span></dt><dd>(undocumented)</dd><dt><span class="strong">See Also:</span></dt><dd><code>StronglyConnectedComponents$.run(org.apache.spark.graphx.Graph<VD, ED>, int, scala.reflect.ClassTag<VD>, scala.reflect.ClassTag<ED>)</code></dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/spark/graphx/GraphLoader.html" title="class in org.apache.spark.graphx"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/spark/graphx/GraphXUtils.html" title="class in org.apache.spark.graphx"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/spark/graphx/GraphOps.html" target="_top">Frames</a></li>
<li><a href="GraphOps.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<script defer="defer" type="text/javascript" src="../../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" src="../../../../lib/api-javadocs.js"></script></body>
</html>