Constructor and Description |
---|
Graph(Graph<K,VV,EV> jgraph,
TypeInformation<K> evidence$61,
scala.reflect.ClassTag<K> evidence$62,
TypeInformation<VV> evidence$63,
scala.reflect.ClassTag<VV> evidence$64,
TypeInformation<EV> evidence$65,
scala.reflect.ClassTag<EV> evidence$66) |
Modifier and Type | Method and Description |
---|---|
Graph<K,VV,EV> |
addEdge(Vertex<K,VV> source,
Vertex<K,VV> target,
EV edgeValue)
Adds the given edge to the graph.
|
Graph<K,VV,EV> |
addEdges(scala.collection.immutable.List<Edge<K,EV>> edges)
Adds the given list edges to the graph.
|
Graph<K,VV,EV> |
addVertex(Vertex<K,VV> vertex)
Adds the input vertex to the graph.
|
Graph<K,VV,EV> |
addVertices(scala.collection.immutable.List<Vertex<K,VV>> vertices)
Adds the list of vertices, passed as input, to the graph.
|
<F> F |
clean(F f,
boolean checkSerializable) |
Graph<K,VV,EV> |
difference(Graph<K,VV,EV> graph)
Performs Difference on the vertex and edge sets of the input graphs
removes common vertices and edges.
|
Graph<K,VV,EV> |
filterOnEdges(FilterFunction<Edge<K,EV>> edgeFilter)
Apply a filtering function to the graph and return a sub-graph that
satisfies the predicates only for the edges.
|
Graph<K,VV,EV> |
filterOnEdges(scala.Function1<Edge<K,EV>,Object> edgeFilterFun)
Apply a filtering function to the graph and return a sub-graph that
satisfies the predicates only for the edges.
|
Graph<K,VV,EV> |
filterOnVertices(FilterFunction<Vertex<K,VV>> vertexFilter)
Apply a filtering function to the graph and return a sub-graph that
satisfies the predicates only for the vertices.
|
Graph<K,VV,EV> |
filterOnVertices(scala.Function1<Vertex<K,VV>,Object> vertexFilterFun)
Apply a filtering function to the graph and return a sub-graph that
satisfies the predicates only for the vertices.
|
static <K,EV> Graph<K,NullValue,EV> |
fromCollection(scala.collection.Seq<Edge<K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$23,
scala.reflect.ClassTag<K> evidence$24,
TypeInformation<EV> evidence$25,
scala.reflect.ClassTag<EV> evidence$26)
Creates a Graph from a Seq of edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromCollection(scala.collection.Seq<Edge<K,EV>> edges,
MapFunction<K,VV> vertexValueInitializer,
ExecutionEnvironment env,
TypeInformation<K> evidence$27,
scala.reflect.ClassTag<K> evidence$28,
TypeInformation<VV> evidence$29,
scala.reflect.ClassTag<VV> evidence$30,
TypeInformation<EV> evidence$31,
scala.reflect.ClassTag<EV> evidence$32)
Creates a graph from a Seq of edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromCollection(scala.collection.Seq<Vertex<K,VV>> vertices,
scala.collection.Seq<Edge<K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$17,
scala.reflect.ClassTag<K> evidence$18,
TypeInformation<VV> evidence$19,
scala.reflect.ClassTag<VV> evidence$20,
TypeInformation<EV> evidence$21,
scala.reflect.ClassTag<EV> evidence$22)
Creates a Graph from a Seq of vertices and a Seq of edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromCsvReader(ExecutionEnvironment env,
String pathEdges,
String pathVertices,
String lineDelimiterVertices,
String fieldDelimiterVertices,
Character quoteCharacterVertices,
boolean ignoreFirstLineVertices,
String ignoreCommentsVertices,
boolean lenientVertices,
int[] includedFieldsVertices,
String lineDelimiterEdges,
String fieldDelimiterEdges,
Character quoteCharacterEdges,
boolean ignoreFirstLineEdges,
String ignoreCommentsEdges,
boolean lenientEdges,
int[] includedFieldsEdges,
MapFunction<K,VV> vertexValueInitializer,
TypeInformation<K> evidence$55,
scala.reflect.ClassTag<K> evidence$56,
TypeInformation<VV> evidence$57,
scala.reflect.ClassTag<VV> evidence$58,
TypeInformation<EV> evidence$59,
scala.reflect.ClassTag<EV> evidence$60)
Creates a Graph from a CSV file of edges.
|
static <K,EV> Graph<K,NullValue,EV> |
fromDataSet(DataSet<Edge<K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$7,
scala.reflect.ClassTag<K> evidence$8,
TypeInformation<EV> evidence$9,
scala.reflect.ClassTag<EV> evidence$10)
Creates a Graph from a DataSet of edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromDataSet(DataSet<Edge<K,EV>> edges,
MapFunction<K,VV> vertexValueInitializer,
ExecutionEnvironment env,
TypeInformation<K> evidence$11,
scala.reflect.ClassTag<K> evidence$12,
TypeInformation<VV> evidence$13,
scala.reflect.ClassTag<VV> evidence$14,
TypeInformation<EV> evidence$15,
scala.reflect.ClassTag<EV> evidence$16)
Creates a graph from a DataSet of edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromDataSet(DataSet<Vertex<K,VV>> vertices,
DataSet<Edge<K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$1,
scala.reflect.ClassTag<K> evidence$2,
TypeInformation<VV> evidence$3,
scala.reflect.ClassTag<VV> evidence$4,
TypeInformation<EV> evidence$5,
scala.reflect.ClassTag<EV> evidence$6)
Creates a Graph from a DataSet of vertices and a DataSet of edges.
|
static <K> Graph<K,NullValue,NullValue> |
fromTuple2DataSet(DataSet<scala.Tuple2<K,K>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$49,
scala.reflect.ClassTag<K> evidence$50)
Creates a Graph from a DataSet of Tuple2's representing the edges.
|
static <K,VV> Graph<K,VV,NullValue> |
fromTuple2DataSet(DataSet<scala.Tuple2<K,K>> edges,
MapFunction<K,VV> vertexValueInitializer,
ExecutionEnvironment env,
TypeInformation<K> evidence$51,
scala.reflect.ClassTag<K> evidence$52,
TypeInformation<VV> evidence$53,
scala.reflect.ClassTag<VV> evidence$54)
Creates a Graph from a DataSet of Tuple2's representing the edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromTupleDataSet(DataSet<scala.Tuple2<K,VV>> vertices,
DataSet<scala.Tuple3<K,K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$33,
scala.reflect.ClassTag<K> evidence$34,
TypeInformation<VV> evidence$35,
scala.reflect.ClassTag<VV> evidence$36,
TypeInformation<EV> evidence$37,
scala.reflect.ClassTag<EV> evidence$38)
Creates a graph from DataSets of tuples for vertices and for edges.
|
static <K,EV> Graph<K,NullValue,EV> |
fromTupleDataSet(DataSet<scala.Tuple3<K,K,EV>> edges,
ExecutionEnvironment env,
TypeInformation<K> evidence$39,
scala.reflect.ClassTag<K> evidence$40,
TypeInformation<EV> evidence$41,
scala.reflect.ClassTag<EV> evidence$42)
Creates a Graph from a DataSet of Tuples representing the edges.
|
static <K,VV,EV> Graph<K,VV,EV> |
fromTupleDataSet(DataSet<scala.Tuple3<K,K,EV>> edges,
MapFunction<K,VV> vertexValueInitializer,
ExecutionEnvironment env,
TypeInformation<K> evidence$43,
scala.reflect.ClassTag<K> evidence$44,
TypeInformation<VV> evidence$45,
scala.reflect.ClassTag<VV> evidence$46,
TypeInformation<EV> evidence$47,
scala.reflect.ClassTag<EV> evidence$48)
Creates a Graph from a DataSet of Tuples representing the edges.
|
DataSet<scala.Tuple2<K,Object>> |
getDegrees()
Return the degree of all vertices in the graph
|
DataSet<scala.Tuple2<K,K>> |
getEdgeIds() |
DataSet<Edge<K,EV>> |
getEdges() |
DataSet<scala.Tuple3<K,K,EV>> |
getEdgesAsTuple3() |
DataSet<Triplet<K,VV,EV>> |
getTriplets() |
Graph<K,VV,EV> |
getUndirected()
This operation adds all inverse-direction edges to the graph.
|
DataSet<K> |
getVertexIds() |
DataSet<Vertex<K,VV>> |
getVertices() |
DataSet<scala.Tuple2<K,VV>> |
getVerticesAsTuple2() |
Graph<K,VV,EV> |
getWrappedGraph() |
<T> DataSet<T> |
groupReduceOnEdges(EdgesFunction<K,EV,T> edgesFunction,
EdgeDirection direction,
TypeInformation<T> evidence$85,
scala.reflect.ClassTag<T> evidence$86)
Compute an aggregate over the edges of each vertex.
|
<T> DataSet<T> |
groupReduceOnEdges(EdgesFunctionWithVertexValue<K,VV,EV,T> edgesFunction,
EdgeDirection direction,
TypeInformation<T> evidence$83,
scala.reflect.ClassTag<T> evidence$84)
Compute an aggregate over the edges of each vertex.
|
<T> DataSet<T> |
groupReduceOnNeighbors(NeighborsFunction<K,VV,EV,T> neighborsFunction,
EdgeDirection direction,
TypeInformation<T> evidence$89,
scala.reflect.ClassTag<T> evidence$90)
Compute an aggregate over the neighbors (edges and vertices) of each
vertex.
|
<T> DataSet<T> |
groupReduceOnNeighbors(NeighborsFunctionWithVertexValue<K,VV,EV,T> neighborsFunction,
EdgeDirection direction,
TypeInformation<T> evidence$87,
scala.reflect.ClassTag<T> evidence$88)
Compute an aggregate over the neighbors (edges and vertices) of each
vertex.
|
DataSet<scala.Tuple2<K,Object>> |
inDegrees()
Return the in-degree of all vertices in the graph
|
Graph<K,NullValue,EV> |
intersect(Graph<K,VV,EV> graph,
boolean distinctEdges)
Performs intersect on the edge sets of the input graphs.
|
<T> Graph<K,VV,EV> |
joinWithEdges(DataSet<scala.Tuple3<K,K,T>> inputDataSet,
EdgeJoinFunction<EV,T> edgeJoinFunction,
TypeInformation<T> evidence$77)
Joins the edge DataSet with an input DataSet on the composite key of both
source and target IDs and applies a user-defined transformation on the values
of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithEdges(DataSet<scala.Tuple3<K,K,T>> inputDataSet,
scala.Function2<EV,T,EV> fun,
TypeInformation<T> evidence$78)
Joins the edge DataSet with an input DataSet on the composite key of both
source and target IDs and applies a user-defined transformation on the values
of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithEdgesOnSource(DataSet<scala.Tuple2<K,T>> inputDataSet,
EdgeJoinFunction<EV,T> edgeJoinFunction,
TypeInformation<T> evidence$79)
Joins the edge DataSet with an input Tuple2 DataSet and applies a user-defined transformation
on the values of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithEdgesOnSource(DataSet<scala.Tuple2<K,T>> inputDataSet,
scala.Function2<EV,T,EV> fun,
TypeInformation<T> evidence$80)
Joins the edge DataSet with an input Tuple2 DataSet and applies a user-defined transformation
on the values of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithEdgesOnTarget(DataSet<scala.Tuple2<K,T>> inputDataSet,
EdgeJoinFunction<EV,T> edgeJoinFunction,
TypeInformation<T> evidence$81)
Joins the edge DataSet with an input Tuple2 DataSet and applies a user-defined transformation
on the values of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithEdgesOnTarget(DataSet<scala.Tuple2<K,T>> inputDataSet,
scala.Function2<EV,T,EV> fun,
TypeInformation<T> evidence$82)
Joins the edge DataSet with an input Tuple2 DataSet and applies a user-defined transformation
on the values of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithVertices(DataSet<scala.Tuple2<K,T>> inputDataSet,
scala.Function2<VV,T,VV> fun,
TypeInformation<T> evidence$76)
Joins the vertex DataSet of this graph with an input Tuple2 DataSet and applies
a user-defined transformation on the values of the matched records.
|
<T> Graph<K,VV,EV> |
joinWithVertices(DataSet<scala.Tuple2<K,T>> inputDataSet,
VertexJoinFunction<VV,T> vertexJoinFunction,
TypeInformation<T> evidence$75)
Joins the vertex DataSet of this graph with an input Tuple2 DataSet and applies
a user-defined transformation on the values of the matched records.
|
<NV> Graph<K,VV,NV> |
mapEdges(scala.Function1<Edge<K,EV>,NV> fun,
TypeInformation<NV> evidence$73,
scala.reflect.ClassTag<NV> evidence$74)
Apply a function to the attribute of each edge in the graph.
|
<NV> Graph<K,VV,NV> |
mapEdges(MapFunction<Edge<K,EV>,NV> mapper,
TypeInformation<NV> evidence$71,
scala.reflect.ClassTag<NV> evidence$72)
Apply a function to the attribute of each edge in the graph.
|
<NV> Graph<K,NV,EV> |
mapVertices(scala.Function1<Vertex<K,VV>,NV> fun,
TypeInformation<NV> evidence$69,
scala.reflect.ClassTag<NV> evidence$70)
Apply a function to the attribute of each vertex in the graph.
|
<NV> Graph<K,NV,EV> |
mapVertices(MapFunction<Vertex<K,VV>,NV> mapper,
TypeInformation<NV> evidence$67,
scala.reflect.ClassTag<NV> evidence$68)
Apply a function to the attribute of each vertex in the graph.
|
long |
numberOfEdges() |
long |
numberOfVertices() |
DataSet<scala.Tuple2<K,Object>> |
outDegrees()
Return the out-degree of all vertices in the graph
|
DataSet<scala.Tuple2<K,EV>> |
reduceOnEdges(ReduceEdgesFunction<EV> reduceEdgesFunction,
EdgeDirection direction)
Compute a reduce transformation over the neighbors' vertex values of each vertex.
|
DataSet<scala.Tuple2<K,VV>> |
reduceOnNeighbors(ReduceNeighborsFunction<VV> reduceNeighborsFunction,
EdgeDirection direction)
Compute a reduce transformation over the neighbors' vertex values of each vertex.
|
Graph<K,VV,EV> |
removeEdge(Edge<K,EV> edge)
Removes all edges that match the given edge from the graph.
|
Graph<K,VV,EV> |
removeEdges(scala.collection.immutable.List<Edge<K,EV>> edges)
Removes all the edges that match the edges in the given data set from the graph.
|
Graph<K,VV,EV> |
removeVertex(Vertex<K,VV> vertex)
Removes the given vertex and its edges from the graph.
|
Graph<K,VV,EV> |
removeVertices(scala.collection.immutable.List<Vertex<K,VV>> vertices)
Removes the given vertex and its edges from the graph.
|
Graph<K,VV,EV> |
reverse()
Reverse the direction of the edges in the graph
|
<T> T |
run(GraphAlgorithm<K,VV,EV,T> algorithm,
TypeInformation<T> evidence$91,
scala.reflect.ClassTag<T> evidence$92) |
<M> Graph<K,VV,EV> |
runGatherSumApplyIteration(GatherFunction<VV,EV,M> gatherFunction,
SumFunction<VV,EV,M> sumFunction,
ApplyFunction<K,VV,M> applyFunction,
int maxIterations)
Runs a Gather-Sum-Apply iteration on the graph.
|
<M> Graph<K,VV,EV> |
runGatherSumApplyIteration(GatherFunction<VV,EV,M> gatherFunction,
SumFunction<VV,EV,M> sumFunction,
ApplyFunction<K,VV,M> applyFunction,
int maxIterations,
GSAConfiguration parameters)
Runs a Gather-Sum-Apply iteration on the graph with configuration options.
|
<M> Graph<K,VV,EV> |
runScatterGatherIteration(VertexUpdateFunction<K,VV,M> vertexUpdateFunction,
MessagingFunction<K,VV,M,EV> messagingFunction,
int maxIterations)
Runs a scatter-gather iteration on the graph.
|
<M> Graph<K,VV,EV> |
runScatterGatherIteration(VertexUpdateFunction<K,VV,M> vertexUpdateFunction,
MessagingFunction<K,VV,M,EV> messagingFunction,
int maxIterations,
ScatterGatherConfiguration parameters)
Runs a scatter-gather iteration on the graph with configuration options.
|
Graph<K,VV,EV> |
subgraph(FilterFunction<Vertex<K,VV>> vertexFilter,
FilterFunction<Edge<K,EV>> edgeFilter)
Apply filtering functions to the graph and return a sub-graph that
satisfies the predicates for both vertices and edges.
|
Graph<K,VV,EV> |
subgraph(scala.Function1<Vertex<K,VV>,Object> vertexFilterFun,
scala.Function1<Edge<K,EV>,Object> edgeFilterFun)
Apply filtering functions to the graph and return a sub-graph that
satisfies the predicates for both vertices and edges.
|
Graph<K,VV,EV> |
union(Graph<K,VV,EV> graph)
Performs union on the vertices and edges sets of the input graphs
removing duplicate vertices but maintaining duplicate edges.
|
boolean |
validate(GraphValidator<K,VV,EV> validator) |
public Graph(Graph<K,VV,EV> jgraph, TypeInformation<K> evidence$61, scala.reflect.ClassTag<K> evidence$62, TypeInformation<VV> evidence$63, scala.reflect.ClassTag<VV> evidence$64, TypeInformation<EV> evidence$65, scala.reflect.ClassTag<EV> evidence$66)
public static <K,VV,EV> Graph<K,VV,EV> fromDataSet(DataSet<Vertex<K,VV>> vertices, DataSet<Edge<K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$1, scala.reflect.ClassTag<K> evidence$2, TypeInformation<VV> evidence$3, scala.reflect.ClassTag<VV> evidence$4, TypeInformation<EV> evidence$5, scala.reflect.ClassTag<EV> evidence$6)
public static <K,EV> Graph<K,NullValue,EV> fromDataSet(DataSet<Edge<K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$7, scala.reflect.ClassTag<K> evidence$8, TypeInformation<EV> evidence$9, scala.reflect.ClassTag<EV> evidence$10)
public static <K,VV,EV> Graph<K,VV,EV> fromDataSet(DataSet<Edge<K,EV>> edges, MapFunction<K,VV> vertexValueInitializer, ExecutionEnvironment env, TypeInformation<K> evidence$11, scala.reflect.ClassTag<K> evidence$12, TypeInformation<VV> evidence$13, scala.reflect.ClassTag<VV> evidence$14, TypeInformation<EV> evidence$15, scala.reflect.ClassTag<EV> evidence$16)
public static <K,VV,EV> Graph<K,VV,EV> fromCollection(scala.collection.Seq<Vertex<K,VV>> vertices, scala.collection.Seq<Edge<K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$17, scala.reflect.ClassTag<K> evidence$18, TypeInformation<VV> evidence$19, scala.reflect.ClassTag<VV> evidence$20, TypeInformation<EV> evidence$21, scala.reflect.ClassTag<EV> evidence$22)
public static <K,EV> Graph<K,NullValue,EV> fromCollection(scala.collection.Seq<Edge<K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$23, scala.reflect.ClassTag<K> evidence$24, TypeInformation<EV> evidence$25, scala.reflect.ClassTag<EV> evidence$26)
public static <K,VV,EV> Graph<K,VV,EV> fromCollection(scala.collection.Seq<Edge<K,EV>> edges, MapFunction<K,VV> vertexValueInitializer, ExecutionEnvironment env, TypeInformation<K> evidence$27, scala.reflect.ClassTag<K> evidence$28, TypeInformation<VV> evidence$29, scala.reflect.ClassTag<VV> evidence$30, TypeInformation<EV> evidence$31, scala.reflect.ClassTag<EV> evidence$32)
public static <K,VV,EV> Graph<K,VV,EV> fromTupleDataSet(DataSet<scala.Tuple2<K,VV>> vertices, DataSet<scala.Tuple3<K,K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$33, scala.reflect.ClassTag<K> evidence$34, TypeInformation<VV> evidence$35, scala.reflect.ClassTag<VV> evidence$36, TypeInformation<EV> evidence$37, scala.reflect.ClassTag<EV> evidence$38)
public static <K,EV> Graph<K,NullValue,EV> fromTupleDataSet(DataSet<scala.Tuple3<K,K,EV>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$39, scala.reflect.ClassTag<K> evidence$40, TypeInformation<EV> evidence$41, scala.reflect.ClassTag<EV> evidence$42)
public static <K,VV,EV> Graph<K,VV,EV> fromTupleDataSet(DataSet<scala.Tuple3<K,K,EV>> edges, MapFunction<K,VV> vertexValueInitializer, ExecutionEnvironment env, TypeInformation<K> evidence$43, scala.reflect.ClassTag<K> evidence$44, TypeInformation<VV> evidence$45, scala.reflect.ClassTag<VV> evidence$46, TypeInformation<EV> evidence$47, scala.reflect.ClassTag<EV> evidence$48)
public static <K> Graph<K,NullValue,NullValue> fromTuple2DataSet(DataSet<scala.Tuple2<K,K>> edges, ExecutionEnvironment env, TypeInformation<K> evidence$49, scala.reflect.ClassTag<K> evidence$50)
public static <K,VV> Graph<K,VV,NullValue> fromTuple2DataSet(DataSet<scala.Tuple2<K,K>> edges, MapFunction<K,VV> vertexValueInitializer, ExecutionEnvironment env, TypeInformation<K> evidence$51, scala.reflect.ClassTag<K> evidence$52, TypeInformation<VV> evidence$53, scala.reflect.ClassTag<VV> evidence$54)
public static <K,VV,EV> Graph<K,VV,EV> fromCsvReader(ExecutionEnvironment env, String pathEdges, String pathVertices, String lineDelimiterVertices, String fieldDelimiterVertices, Character quoteCharacterVertices, boolean ignoreFirstLineVertices, String ignoreCommentsVertices, boolean lenientVertices, int[] includedFieldsVertices, String lineDelimiterEdges, String fieldDelimiterEdges, Character quoteCharacterEdges, boolean ignoreFirstLineEdges, String ignoreCommentsEdges, boolean lenientEdges, int[] includedFieldsEdges, MapFunction<K,VV> vertexValueInitializer, TypeInformation<K> evidence$55, scala.reflect.ClassTag<K> evidence$56, TypeInformation<VV> evidence$57, scala.reflect.ClassTag<VV> evidence$58, TypeInformation<EV> evidence$59, scala.reflect.ClassTag<EV> evidence$60)
The edge value is read from the CSV file if EV
is not of type NullValue
. Otherwise the
edge value is set to NullValue
.
If the vertex value type VV
is specified (unequal NullValue
), then the vertex values
are read from the file specified by pathVertices. If the path has not been specified then the
vertexValueInitializer is used to initialize the vertex values of the vertices extracted from
the set of edges. If the vertexValueInitializer has not been set either, then the method
fails.
env
- The Execution Environment.pathEdges
- The file path containing the edges.pathVertices
- The file path containing the vertices.lineDelimiterVertices
- The string that separates lines in the vertices file. It defaults
to newline.fieldDelimiterVertices
- The string that separates vertex Ids from vertex values in the
vertices file.quoteCharacterVertices
- The character to use for quoted String parsing in the vertices
file. Disabled by default.ignoreFirstLineVertices
- Whether the first line in the vertices file should be ignored.ignoreCommentsVertices
- Lines that start with the given String in the vertices file
are ignored, disabled by default.lenientVertices
- Whether the parser should silently ignore malformed lines in the
vertices file.includedFieldsVertices
- The fields in the vertices file that should be read. By default
all fields are read.lineDelimiterEdges
- The string that separates lines in the edges file. It defaults to
newline.fieldDelimiterEdges
- The string that separates fields in the edges file.quoteCharacterEdges
- The character to use for quoted String parsing in the edges file.
Disabled by default.ignoreFirstLineEdges
- Whether the first line in the vertices file should be ignored.ignoreCommentsEdges
- Lines that start with the given String in the edges file are
ignored, disabled by default.lenientEdges
- Whether the parser should silently ignore malformed lines in the edges
file.includedFieldsEdges
- The fields in the edges file that should be read. By default all
fields are read.vertexValueInitializer
- If no vertex values are provided, this mapper can be used to
initialize them, by applying a map transformation on the vertex
IDs.public <F> F clean(F f, boolean checkSerializable)
public DataSet<scala.Tuple2<K,VV>> getVerticesAsTuple2()
public DataSet<scala.Tuple3<K,K,EV>> getEdgesAsTuple3()
public DataSet<Triplet<K,VV,EV>> getTriplets()
public <NV> Graph<K,NV,EV> mapVertices(MapFunction<Vertex<K,VV>,NV> mapper, TypeInformation<NV> evidence$67, scala.reflect.ClassTag<NV> evidence$68)
mapper
- the map function to apply.public <NV> Graph<K,NV,EV> mapVertices(scala.Function1<Vertex<K,VV>,NV> fun, TypeInformation<NV> evidence$69, scala.reflect.ClassTag<NV> evidence$70)
fun
- the map function to apply.public <NV> Graph<K,VV,NV> mapEdges(MapFunction<Edge<K,EV>,NV> mapper, TypeInformation<NV> evidence$71, scala.reflect.ClassTag<NV> evidence$72)
mapper
- the map function to apply.public <NV> Graph<K,VV,NV> mapEdges(scala.Function1<Edge<K,EV>,NV> fun, TypeInformation<NV> evidence$73, scala.reflect.ClassTag<NV> evidence$74)
fun
- the map function to apply.public <T> Graph<K,VV,EV> joinWithVertices(DataSet<scala.Tuple2<K,T>> inputDataSet, VertexJoinFunction<VV,T> vertexJoinFunction, TypeInformation<T> evidence$75)
inputDataSet
- the Tuple2 DataSet to join with.
The first field of the Tuple2 is used as the join key and the second field is passed
as a parameter to the transformation function.vertexJoinFunction
- the transformation function to apply.
The first parameter is the current vertex value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public <T> Graph<K,VV,EV> joinWithVertices(DataSet<scala.Tuple2<K,T>> inputDataSet, scala.Function2<VV,T,VV> fun, TypeInformation<T> evidence$76)
inputDataSet
- the Tuple2 DataSet to join with.
The first field of the Tuple2 is used as the join key and the second field is passed
as a parameter to the transformation function.fun
- the transformation function to apply.
The first parameter is the current vertex value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public <T> Graph<K,VV,EV> joinWithEdges(DataSet<scala.Tuple3<K,K,T>> inputDataSet, EdgeJoinFunction<EV,T> edgeJoinFunction, TypeInformation<T> evidence$77)
inputDataSet
- the DataSet to join with.
The first two fields of the Tuple3 are used as the composite join key
and the third field is passed as a parameter to the transformation function.edgeJoinFunction
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple3 from the input DataSet.
public <T> Graph<K,VV,EV> joinWithEdges(DataSet<scala.Tuple3<K,K,T>> inputDataSet, scala.Function2<EV,T,EV> fun, TypeInformation<T> evidence$78)
inputDataSet
- the DataSet to join with.
The first two fields of the Tuple3 are used as the composite join key
and the third field is passed as a parameter to the transformation function.fun
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple3 from the input DataSet.
public <T> Graph<K,VV,EV> joinWithEdgesOnSource(DataSet<scala.Tuple2<K,T>> inputDataSet, EdgeJoinFunction<EV,T> edgeJoinFunction, TypeInformation<T> evidence$79)
inputDataSet
- the DataSet to join with.
The first field of the Tuple2 is used as the join key
and the second field is passed as a parameter to the transformation function.edgeJoinFunction
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public <T> Graph<K,VV,EV> joinWithEdgesOnSource(DataSet<scala.Tuple2<K,T>> inputDataSet, scala.Function2<EV,T,EV> fun, TypeInformation<T> evidence$80)
inputDataSet
- the DataSet to join with.
The first field of the Tuple2 is used as the join key
and the second field is passed as a parameter to the transformation function.fun
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public <T> Graph<K,VV,EV> joinWithEdgesOnTarget(DataSet<scala.Tuple2<K,T>> inputDataSet, EdgeJoinFunction<EV,T> edgeJoinFunction, TypeInformation<T> evidence$81)
inputDataSet
- the DataSet to join with.
The first field of the Tuple2 is used as the join key
and the second field is passed as a parameter to the transformation function.edgeJoinFunction
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public <T> Graph<K,VV,EV> joinWithEdgesOnTarget(DataSet<scala.Tuple2<K,T>> inputDataSet, scala.Function2<EV,T,EV> fun, TypeInformation<T> evidence$82)
inputDataSet
- the DataSet to join with.
The first field of the Tuple2 is used as the join key
and the second field is passed as a parameter to the transformation function.fun
- the transformation function to apply.
The first parameter is the current edge value and the second parameter is the value
of the matched Tuple2 from the input DataSet.public Graph<K,VV,EV> subgraph(FilterFunction<Vertex<K,VV>> vertexFilter, FilterFunction<Edge<K,EV>> edgeFilter)
vertexFilter
- the filter function for vertices.edgeFilter
- the filter function for edges.public Graph<K,VV,EV> subgraph(scala.Function1<Vertex<K,VV>,Object> vertexFilterFun, scala.Function1<Edge<K,EV>,Object> edgeFilterFun)
vertexFilterFun
- the filter function for vertices.edgeFilterFun
- the filter function for edges.public Graph<K,VV,EV> filterOnVertices(FilterFunction<Vertex<K,VV>> vertexFilter)
vertexFilter
- the filter function for vertices.public Graph<K,VV,EV> filterOnVertices(scala.Function1<Vertex<K,VV>,Object> vertexFilterFun)
vertexFilterFun
- the filter function for vertices.public Graph<K,VV,EV> filterOnEdges(FilterFunction<Edge<K,EV>> edgeFilter)
edgeFilter
- the filter function for edges.public Graph<K,VV,EV> filterOnEdges(scala.Function1<Edge<K,EV>,Object> edgeFilterFun)
edgeFilterFun
- the filter function for edges.public DataSet<scala.Tuple2<K,Object>> inDegrees()
public DataSet<scala.Tuple2<K,Object>> outDegrees()
public DataSet<scala.Tuple2<K,Object>> getDegrees()
public Graph<K,VV,EV> getUndirected()
public Graph<K,VV,EV> reverse()
UnsupportedOperationException
public <T> DataSet<T> groupReduceOnEdges(EdgesFunctionWithVertexValue<K,VV,EV,T> edgesFunction, EdgeDirection direction, TypeInformation<T> evidence$83, scala.reflect.ClassTag<T> evidence$84)
edgesFunction
- the function to apply to the neighborhooddirection
- the edge direction (in-, out-, all-)public <T> DataSet<T> groupReduceOnEdges(EdgesFunction<K,EV,T> edgesFunction, EdgeDirection direction, TypeInformation<T> evidence$85, scala.reflect.ClassTag<T> evidence$86)
edgesFunction
- the function to apply to the neighborhooddirection
- the edge direction (in-, out-, all-)public <T> DataSet<T> groupReduceOnNeighbors(NeighborsFunctionWithVertexValue<K,VV,EV,T> neighborsFunction, EdgeDirection direction, TypeInformation<T> evidence$87, scala.reflect.ClassTag<T> evidence$88)
neighborsFunction
- the function to apply to the neighborhooddirection
- the edge direction (in-, out-, all-)public <T> DataSet<T> groupReduceOnNeighbors(NeighborsFunction<K,VV,EV,T> neighborsFunction, EdgeDirection direction, TypeInformation<T> evidence$89, scala.reflect.ClassTag<T> evidence$90)
neighborsFunction
- the function to apply to the neighborhooddirection
- the edge direction (in-, out-, all-)public long numberOfVertices()
public long numberOfEdges()
public Graph<K,VV,EV> addVertex(Vertex<K,VV> vertex)
vertex
- the vertex to be addedpublic Graph<K,VV,EV> addVertices(scala.collection.immutable.List<Vertex<K,VV>> vertices)
vertices
- the list of vertices to addpublic Graph<K,VV,EV> addEdges(scala.collection.immutable.List<Edge<K,EV>> edges)
When adding an edge for a non-existing set of vertices, the edge is considered invalid and ignored.
edges
- the data set of edges to be addedpublic Graph<K,VV,EV> addEdge(Vertex<K,VV> source, Vertex<K,VV> target, EV edgeValue)
source
- the source vertex of the edgetarget
- the target vertex of the edgeedgeValue
- the edge valuepublic Graph<K,VV,EV> removeVertex(Vertex<K,VV> vertex)
vertex
- the vertex to removepublic Graph<K,VV,EV> removeVertices(scala.collection.immutable.List<Vertex<K,VV>> vertices)
vertices
- list of vertices to removepublic Graph<K,VV,EV> removeEdge(Edge<K,EV> edge)
edge
- the edge to removepublic Graph<K,VV,EV> removeEdges(scala.collection.immutable.List<Edge<K,EV>> edges)
edges
- the list of edges to be removedpublic Graph<K,VV,EV> union(Graph<K,VV,EV> graph)
graph
- the graph to perform union withpublic Graph<K,VV,EV> difference(Graph<K,VV,EV> graph)
graph
- the graph to perform difference withpublic Graph<K,NullValue,EV> intersect(Graph<K,VV,EV> graph, boolean distinctEdges)
The method computes pairs of equal edges from the input graphs. If the same edge occurs
multiple times in the input graphs, there will be multiple edge pairs to be considered. Each
edge instance can only be part of one pair. If the given parameter distinctEdges
is set
to true
, there will be exactly one edge in the output graph representing all pairs of
equal edges. If the parameter is set to false
, both edges of each pair will be in the
output.
Vertices in the output graph will have no vertex values.
graph
- the graph to perform intersect withdistinctEdges
- if set to { @code true}, there will be exactly one edge in the output
graph representing all pairs of equal edges, otherwise, for each pair,
both edges will be in the output graphpublic DataSet<scala.Tuple2<K,VV>> reduceOnNeighbors(ReduceNeighborsFunction<VV> reduceNeighborsFunction, EdgeDirection direction)
ReduceNeighborsFunction
until only a single value for each vertex remains.
The ReduceNeighborsFunction
combines a pair of neighbor vertex values
into one new value of the same type.
reduceNeighborsFunction
- the reduce function to apply to the neighbors of each vertex.direction
- the edge direction (in-, out-, all-)ReduceNeighborsFunction
.public DataSet<scala.Tuple2<K,EV>> reduceOnEdges(ReduceEdgesFunction<EV> reduceEdgesFunction, EdgeDirection direction)
ReduceNeighborsFunction
until only a single value for each vertex remains.
The ReduceNeighborsFunction
combines a pair of neighbor vertex values
into one new value of the same type.
reduceEdgesFunction
- the reduce function to apply to the edges of each vertex.direction
- the edge direction (in-, out-, all-)ReduceNeighborsFunction
.public <T> T run(GraphAlgorithm<K,VV,EV,T> algorithm, TypeInformation<T> evidence$91, scala.reflect.ClassTag<T> evidence$92)
public <M> Graph<K,VV,EV> runScatterGatherIteration(VertexUpdateFunction<K,VV,M> vertexUpdateFunction, MessagingFunction<K,VV,M,EV> messagingFunction, int maxIterations)
vertexUpdateFunction
- the vertex update functionmessagingFunction
- the messaging functionmaxIterations
- maximum number of iterations to perform
public <M> Graph<K,VV,EV> runScatterGatherIteration(VertexUpdateFunction<K,VV,M> vertexUpdateFunction, MessagingFunction<K,VV,M,EV> messagingFunction, int maxIterations, ScatterGatherConfiguration parameters)
vertexUpdateFunction
- the vertex update functionmessagingFunction
- the messaging functionmaxIterations
- maximum number of iterations to performparameters
- the iteration configuration parameters
public <M> Graph<K,VV,EV> runGatherSumApplyIteration(GatherFunction<VV,EV,M> gatherFunction, SumFunction<VV,EV,M> sumFunction, ApplyFunction<K,VV,M> applyFunction, int maxIterations)
gatherFunction
- the gather function collects information about adjacent
vertices and edgessumFunction
- the sum function aggregates the gathered informationapplyFunction
- the apply function updates the vertex values with the aggregatesmaxIterations
- maximum number of iterations to performpublic <M> Graph<K,VV,EV> runGatherSumApplyIteration(GatherFunction<VV,EV,M> gatherFunction, SumFunction<VV,EV,M> sumFunction, ApplyFunction<K,VV,M> applyFunction, int maxIterations, GSAConfiguration parameters)
gatherFunction
- the gather function collects information about adjacent
vertices and edgessumFunction
- the sum function aggregates the gathered informationapplyFunction
- the apply function updates the vertex values with the aggregatesmaxIterations
- maximum number of iterations to performparameters
- the iteration configuration parameterspublic boolean validate(GraphValidator<K,VV,EV> validator)
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.