public class PathGraph extends GraphGeneratorBase<LongValue,NullValue,NullValue>
Modifier and Type | Field and Description |
---|---|
static int |
MINIMUM_VERTEX_COUNT |
parallelism
Constructor and Description |
---|
PathGraph(ExecutionEnvironment env,
long vertexCount)
An undirected
Graph with n vertices where each vertex vi connects
to adjacent vertices vi+1 when i < n-1 and vi-1 when i >
0 . |
Modifier and Type | Method and Description |
---|---|
Graph<LongValue,NullValue,NullValue> |
generate()
Generates the configured graph.
|
setParallelism
public static final int MINIMUM_VERTEX_COUNT
public PathGraph(ExecutionEnvironment env, long vertexCount)
Graph
with n
vertices where each vertex vi connects
to adjacent vertices vi+1 when i < n-1
and vi-1 when i >
0
.
A PathGraph
is distinguished from a CycleGraph
in that the first and last
vertex are not connected, breaking the cycle.
env
- the Flink execution environmentvertexCount
- number of verticespublic Graph<LongValue,NullValue,NullValue> generate()
GraphGenerator
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.