dijkstra_nodes: Find the shortest paths to other vertices

Description Usage Arguments Value

View source: R/RcppExports.R

Description

Find the shortest paths to other vertices

Usage

1
dijkstra_nodes(dist, src, node_costs)

Arguments

dist

A matrix of distances between nodes

src

An integer vertex ID

node_costs

a list of costs, in order, of all nodes represented in the sociomatrix, all are assumed 0 if unspecified

Value

A numeric vector, entry i of which is the vertex immediately preceeding vertex i in the shortest path leading to i. Full paths must be constructed recursively.


gretel documentation built on Aug. 22, 2019, 5:10 p.m.