K
- vertex ID typeOLD
- old vertex value typeNEW
- new vertex value typeEV
- edge value typepublic class TranslateVertexValues<K,OLD,NEW,EV> extends GraphAlgorithmDelegatingGraph<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(GraphAlgorithmDelegatingGraph 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()
GraphAlgorithmDelegatingGraph
getAlgorithmName
in class GraphAlgorithmDelegatingGraph<K,OLD,EV,K,NEW,EV>
protected boolean mergeConfiguration(GraphAlgorithmDelegatingGraph other)
GraphAlgorithmDelegatingGraph
mergeConfiguration
in class GraphAlgorithmDelegatingGraph<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
GraphAlgorithmDelegatingGraph
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmDelegatingGraph<K,OLD,EV,K,NEW,EV>
input
- the input graphException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.