K
- vertex ID typeVV
- vertex value typeOLD
- old edge value typeNEW
- new edge value typepublic class TranslateEdgeValues<K,VV,OLD,NEW> extends GraphAlgorithmWrappingGraph<K,VV,OLD,K,VV,NEW>
Edge
values using the given TranslateFunction
.Constructor and Description |
---|
TranslateEdgeValues(TranslateFunction<OLD,NEW> translator)
Translate
Edge values using the given TranslateFunction . |
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,NEW> |
runInternal(Graph<K,VV,OLD> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
TranslateEdgeValues<K,VV,OLD,NEW> |
setParallelism(int parallelism)
Override the operator parallelism.
|
equals, hashCode, run
public TranslateEdgeValues(TranslateFunction<OLD,NEW> translator)
Edge
values using the given TranslateFunction
.translator
- implements conversion from OLD
to NEW
public TranslateEdgeValues<K,VV,OLD,NEW> setParallelism(int parallelism)
parallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingGraph
getAlgorithmName
in class GraphAlgorithmWrappingGraph<K,VV,OLD,K,VV,NEW>
protected boolean mergeConfiguration(GraphAlgorithmWrappingGraph other)
GraphAlgorithmWrappingGraph
mergeConfiguration
in class GraphAlgorithmWrappingGraph<K,VV,OLD,K,VV,NEW>
other
- the algorithm with which to compare and mergepublic Graph<K,VV,NEW> runInternal(Graph<K,VV,OLD> input) throws Exception
GraphAlgorithmWrappingGraph
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingGraph<K,VV,OLD,K,VV,NEW>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.