K
- ID typeVV
- vertex value typeEV
- edge value typeT
- output typepublic abstract class GraphAlgorithmDelegatingDataSet<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 GraphAlgorithmDelegatingDataSet
wraps the resultant
DataSet
with a delegating proxy object. The delegated object 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 |
---|
GraphAlgorithmDelegatingDataSet() |
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(GraphAlgorithmDelegatingDataSet 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(GraphAlgorithmDelegatingDataSet 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–2017 The Apache Software Foundation. All rights reserved.