K
- ID typeVV
- vertex value typeEV
- edge value typeT
- output typepublic abstract class GraphAlgorithmWrappingDataSet<K,VV,EV,T> extends Object implements GraphAlgorithm<K,VV,EV,DataSet<T>>
GraphAlgorithm
transforms an input Graph
into an output of
type T
. A GraphAlgorithmWrappingDataSet
wraps the resultant
DataSet
with a NoOpOperator
. The input to the wrapped
operator can be replaced when the same algorithm is run on the same input
with a mergeable configuration. This allows algorithms to be composed of
implicitly reusable algorithms without publicly sharing intermediate
DataSet
s.Constructor and Description |
---|
GraphAlgorithmWrappingDataSet() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
protected abstract String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
int |
hashCode() |
protected abstract boolean |
mergeConfiguration(GraphAlgorithmWrappingDataSet other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
DataSet<T> |
run(Graph<K,VV,EV> input) |
protected abstract DataSet<T> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
protected abstract String getAlgorithmName()
protected abstract boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other)
other
- the algorithm with which to compare and mergeprotected abstract DataSet<T> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithm.run(Graph)
.input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.