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