K
- ID typeVV
- vertex value typeEV
- edge value typepublic class MaximumDegree<K,VV,EV> extends GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
Constructor and Description |
---|
MaximumDegree(long maximumDegree)
Filter out vertices with degree greater than the given maximum.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected boolean |
mergeConfiguration(GraphAlgorithmWrappingGraph other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
Graph<K,VV,EV> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
MaximumDegree<K,VV,EV> |
setBroadcastHighDegreeVertices(boolean broadcastHighDegreeVertices)
After filtering high-degree vertices this algorithm must perform joins
on the original graph's vertex set and on both the source and target IDs
of the edge set.
|
MaximumDegree<K,VV,EV> |
setParallelism(int parallelism)
Override the operator parallelism.
|
MaximumDegree<K,VV,EV> |
setReduceOnTargetId(boolean reduceOnTargetId)
The degree can be counted from either the edge source or target IDs.
|
equals, hashCode, run
public MaximumDegree(long maximumDegree)
maximumDegree
- maximum degreepublic MaximumDegree<K,VV,EV> setReduceOnTargetId(boolean reduceOnTargetId)
reduceOnTargetId
- set to true
if the input edge list
is sorted by target IDpublic MaximumDegree<K,VV,EV> setBroadcastHighDegreeVertices(boolean broadcastHighDegreeVertices)
broadcastHighDegreeVertices
- set to true
if the high-degree
vertices should be broadcast when joiningpublic MaximumDegree<K,VV,EV> setParallelism(int parallelism)
parallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingGraph
getAlgorithmName
in class GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
protected boolean mergeConfiguration(GraphAlgorithmWrappingGraph other)
GraphAlgorithmWrappingGraph
mergeConfiguration
in class GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
other
- the algorithm with which to compare and mergepublic Graph<K,VV,EV> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingGraph
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.