wgraph.prune.long.edges: Prune Long Edges in a Weighted Graph

View source: R/graph_pruning.R

wgraph.prune.long.edgesR Documentation

Prune Long Edges in a Weighted Graph

Description

Prune Long Edges in a Weighted Graph

Usage

wgraph.prune.long.edges(
  graph,
  edge.lengths,
  alt.path.len.ratio.thld,
  use.total.length.constraint = TRUE,
  verbose = FALSE
)

Arguments

graph

A graph adjacency list.

edge.lengths

Edge-length list matching graph.

alt.path.len.ratio.thld

Alternative-path threshold.

use.total.length.constraint

If TRUE, compare total alternative path length with the original edge. Otherwise require every edge on the alternative path to be shorter than the original edge times the threshold.

verbose

Logical progress flag.

Value

A list with pruned adjacency and edge-length lists.


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