Graph algorithms over NetworkNode/NetworkLink diagrams: PageRank, shortest paths, all simple paths, connectivity, and connected components. Links are treated as directed unless Bidirectional is set.

Members

MemberKindDescription
static PageRankResult PageRank( IEnumerable<NetworkNode> nodes, IEnumerable<NetworkLink> links, double damping = 0.85, int maxIterations = 100, double tolerance = 1e-8)MethodComputes PageRank scores. Dangling nodes distribute their rank evenly across all nodes.
static void ApplyPageRank(PageRankResult result, SKColor? color = null)MethodApplies PageRank scores visually: node scale (and optional color alpha) are normalized between the minimum and maximum scores.
static List<NetworkNode> ShortestPath( NetworkNode from, NetworkNode to, IEnumerable<NetworkLink> links, bool weighted = true)MethodFinds the shortest path (Dijkstra when weighted, BFS otherwise). Returns the node sequence including endpoints, or an empty list when unreachable.
static List<List<NetworkNode>> AllSimplePaths( NetworkNode from, NetworkNode to, IEnumerable<NetworkLink> links, int maxPaths = 50, int maxDepth = 32)MethodEnumerates simple (loop-free) paths between two nodes, depth-first, up to a cap.
static bool IsConnected(IEnumerable<NetworkNode> nodes, IEnumerable<NetworkLink> links)MethodReturns true when all nodes are reachable from the first node (ignoring link direction).
static List<List<NetworkNode>> ConnectedComponents(IEnumerable<NetworkNode> nodes, IEnumerable<NetworkLink> links)MethodReturns connected components (undirected view of the graph).
static double PathCost(IReadOnlyList<NetworkNode> path, IEnumerable<NetworkLink> links, bool weighted = true)MethodSums the cost of a node path (edges matched by consecutive node pairs).

Related