Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
1f45e4e5
Commit
1f45e4e5
authored
11 years ago
by
Joseph E. Gonzalez
Browse files
Options
Downloads
Patches
Plain Diff
starting structural operator discussion.
parent
feaa0780
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/graphx-programming-guide.md
+30
-2
30 additions, 2 deletions
docs/graphx-programming-guide.md
with
30 additions
and
2 deletions
docs/graphx-programming-guide.md
+
30
−
2
View file @
1f45e4e5
...
@@ -232,11 +232,9 @@ In direct analogy to the RDD `map` operator, the property
...
@@ -232,11 +232,9 @@ In direct analogy to the RDD `map` operator, the property
graph contains the following:
graph contains the following:
{% highlight scala %}
{% highlight scala %}
class Graph[VD, ED] {
def mapVertices
[
VD2
](
map:
(VertexID, VD)
=> VD2): Graph[VD2, ED]
def mapVertices
[
VD2
](
map:
(VertexID, VD)
=> VD2): Graph[VD2, ED]
def mapEdges
[
ED2
](
map:
Edge[ED] => ED2): Graph[VD, ED2]
def mapEdges
[
ED2
](
map:
Edge[ED] => ED2): Graph[VD, ED2]
def mapTriplets
[
ED2
](
map:
EdgeTriplet[VD, ED] => ED2): Graph[VD, ED2]
def mapTriplets
[
ED2
](
map:
EdgeTriplet[VD, ED] => ED2): Graph[VD, ED2]
}
{% endhighlight %}
{% endhighlight %}
Each of these operators yields a new graph with the vertex or edge properties modified by the user
Each of these operators yields a new graph with the vertex or edge properties modified by the user
...
@@ -269,6 +267,36 @@ val outputGraph: Graph[Double, Double] =
...
@@ -269,6 +267,36 @@ val outputGraph: Graph[Double, Double] =
## Structural Operators
## Structural Operators
<a
name=
"structural_operators"
></a>
<a
name=
"structural_operators"
></a>
Currently GraphX supports only a simple set of commonly used structural operators and we expect to
add more in the future. The following is a list of the basic structural operators.
{% highlight scala %}
def reverse: Graph[VD, ED]
def subgraph(epred: EdgeTriplet[VD,ED] => Boolean = (x => true),
vpred: (VertexID, VD) => Boolean = ((v,d) => true) ): Graph[VD, ED]
def mask
[
VD2, ED2
](
other:
Graph[VD2, ED2]): Graph[VD, ED]
def groupEdges(merge: (ED, ED) => ED): Graph[VD,ED]
{% endhighlight %}
The
`rerverse`
operator returns a new graph with all the edge directions reversed. This can be
useful when for example trying to compute the inverse PageRank.
The
`subgraph`
operator takes vertex and edge predicates and returns the graph containing only the
vertices that satisfy the vertex predicate (evaluate to true) and edges that satisfy the edge
predicate
*and connect vertices that satisfy the vertex predicate*
. The
`subgraph`
operator can be
used in number of situations to restrict the graph to the vertices and edges of interest or
eliminate broken links.
The
`mask`
operators returns the subgraph containing vertices and edges that are found in the input
graph. Finish this description ...
The
`groupEdges`
operator merges ...
## Join Operators
## Join Operators
<a
name=
"join_operators"
></a>
<a
name=
"join_operators"
></a>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment