shortest.path: Computes Shortest Path Distances for Selected Vertices

View source: R/path_graphs.R

shortest.pathR Documentation

Computes Shortest Path Distances for Selected Vertices

Description

Computes Shortest Path Distances for Selected Vertices

Usage

shortest.path(graph, edge.lengths, vertices)

Arguments

graph

A graph adjacency list using 1-based vertex indices.

edge.lengths

Edge-length list matching graph.

vertices

Integer vector of vertices for which to compute distances.

Value

A numeric matrix of shortest-path distances.


dgraphs documentation built on Aug. 21, 2026, 1:08 a.m.