Skip to contents

Compute a Weighted Graph Diameter

Usage

compute.graph.diameter(graph, stage = "final")

Arguments

graph

A dgraph with stored lengths.

stage

Stored graph stage.

Value

A list containing the diameter and the farthest path details.

Examples

graph <- list(2L, c(1L, 3L), 2L)
weights <- list(1, c(1, 2), 2)
compute.graph.diameter(dgraph(graph, weights))$diameter
#> [1] 3