Documentation
¶
Overview ¶
Package pagerank implements the *weighted* PageRank algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph holds node and edge data.
func (*Graph) Link ¶
Link creates a weighted edge between a source-target node pair. If the edge already exists, the weight is incremented.
func (*Graph) Rank ¶
Rank computes the PageRank of every node in the directed graph. α (alpha) is the damping factor, usually set to 0.85. ε (epsilon) is the convergence criteria, usually set to a tiny value.
This method will run as many iterations as needed, until the graph converges.
Source Files
¶
- pagerank.go
Click to show internal directories.
Click to hide internal directories.