Skip to content

@eightkk/vue-weave / core / graphPageRank

Function: graphPageRank() ​

graphPageRank(nodes, edges, options?): GraphPageRankResult

Defined in: src/core/graphAnalysis.ts:229

PageRank by power iteration. Edges point from the linking node to the linked one; parallel edges add their weights and a self-loop is an ordinary link. Nodes without outgoing weight (dangling) spread their score uniformly over all nodes. Returns { scores, iterations, converged } rather than a bare map so callers can detect a run that hit the iteration cap.

Parameters ​

nodes ​

readonly IdentifiedNode[]

edges ​

readonly GraphEdge<unknown>[]

options? ​

GraphPageRankOptions = {}

Returns ​

GraphPageRankResult

Released under the MIT License.