Class PageRankAlgorithm<TVertex, TEdge>
Algorithm that computes the page rank of a graph.
Inheritance
System.Object
AlgorithmBase<IBidirectionalGraph<TVertex, TEdge>>
PageRankAlgorithm<TVertex, TEdge>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: QuikGraph.Algorithms.Ranking
Assembly: QuikGraph.dll
Syntax
public sealed class PageRankAlgorithm<TVertex, TEdge> : AlgorithmBase<IBidirectionalGraph<TVertex, TEdge>>, IAlgorithm<IBidirectionalGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourcePageRankAlgorithm(IBidirectionalGraph<TVertex, TEdge>)
Initializes a new instance of the PageRankAlgorithm<TVertex, TEdge> class.
Declaration
public PageRankAlgorithm(IBidirectionalGraph<TVertex, TEdge> visitedGraph)
Parameters
Type | Name | Description |
---|---|---|
IBidirectionalGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceDamping
Gets or sets the damping rate [0-1].
Declaration
public double Damping { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Remarks
By default it uses 0.85 which is the value generally used.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value is negative or higher than 1. |
MaxIterations
Gets or sets the maximum number of iterations.
Declaration
public int MaxIterations { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value is negative or equal 0. |
Ranks
Ranks per vertices.
Declaration
public IDictionary<TVertex, double> Ranks { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TVertex, System.Double> |
Tolerance
Gets or sets the error tolerance (used to stop the algorithm).
Declaration
public double Tolerance { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value is negative. |
Methods
| Improve this Doc View SourceGetRanksMean()
Gets the rank average.
Declaration
public double GetRanksMean()
Returns
Type | Description |
---|---|
System.Double | Rank average. |
GetRanksSum()
Gets the sum of all ranks.
Declaration
public double GetRanksSum()
Returns
Type | Description |
---|---|
System.Double | Ranks sum. |
Initialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IBidirectionalGraph<TVertex, TEdge>>.Initialize()
|
Improve this Doc
View Source
InternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IBidirectionalGraph<TVertex, TEdge>>.InternalCompute()