Documentation
¶
Overview ¶
Example 08_pagerank — runs PageRank on a small directed "authority" graph and prints each page's rank, sorted from most to least important.
The graph models a tiny web of pages that link to one another. Four peripheral pages (B, C, D, E) all link to a single Authority page A, giving A a high in-degree. A is the only node every other page endorses, so the random-surfer model concentrates the most stationary mass on it. A links back to a Hub page H, which in turn links to two of the peripheral pages — this asymmetry is what makes the four peripheral ranks differ from one another instead of being identical.
Unlike a symmetric cycle (where every PageRank score is the same), this topology produces clearly distinct ranks: the authority A wins, the hub H comes next on the strength of A's single outgoing link, the two pages H endorses (B, C) outrank the two it does not (D, E).
Sample output: run `go run ./examples/08_pagerank` and capture the stdout — the output is deterministic for the inputs hard-coded above and serves as the regression baseline a future change should preserve.