K
- graph ID typeVV
- vertex value typeEV
- edge value typepublic class PageRank<K,VV,EV> extends GraphAlgorithmWrappingDataSet<K,VV,EV,PageRank.Result<K>>
HITS
.
http://ilpubs.stanford.edu:8090/422/1/1999-66.pdfModifier and Type | Class and Description |
---|---|
static class |
PageRank.Result<T>
Wraps the
Tuple2 to encapsulate results from the PageRank algorithm. |
Constructor and Description |
---|
PageRank(double dampingFactor,
double convergenceThreshold)
PageRank with a convergence threshold.
|
PageRank(double dampingFactor,
int iterations)
PageRank with a fixed number of iterations.
|
PageRank(double dampingFactor,
int maxIterations,
double convergenceThreshold)
PageRank with a convergence threshold and a maximum iteration count.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected boolean |
mergeConfiguration(GraphAlgorithmWrappingDataSet other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
DataSet<PageRank.Result<K>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
PageRank<K,VV,EV> |
setParallelism(int parallelism)
Override the operator parallelism.
|
equals, hashCode, run
public PageRank(double dampingFactor, int iterations)
dampingFactor
- probability of following an out-link, otherwise jump to a random vertexiterations
- fixed number of iterationspublic PageRank(double dampingFactor, double convergenceThreshold)
dampingFactor
- probability of following an out-link, otherwise jump to a random vertexconvergenceThreshold
- convergence threshold for sum of scorespublic PageRank(double dampingFactor, int maxIterations, double convergenceThreshold)
dampingFactor
- probability of following an out-link, otherwise jump to a random vertexmaxIterations
- maximum number of iterationsconvergenceThreshold
- convergence threshold for sum of scorespublic PageRank<K,VV,EV> setParallelism(int parallelism)
parallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingDataSet
getAlgorithmName
in class GraphAlgorithmWrappingDataSet<K,VV,EV,PageRank.Result<K>>
protected boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other)
GraphAlgorithmWrappingDataSet
mergeConfiguration
in class GraphAlgorithmWrappingDataSet<K,VV,EV,PageRank.Result<K>>
other
- the algorithm with which to compare and mergepublic DataSet<PageRank.Result<K>> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingDataSet
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingDataSet<K,VV,EV,PageRank.Result<K>>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.