print.summary.mst_completion_graph: Print Summary of MST Completion Graph

View source: R/mst_completion_graphs.R

print.summary.mst_completion_graphR Documentation

Print Summary of MST Completion Graph

Description

Formats and displays the summary information for an MST completion graph in a readable format.

Usage

## S3 method for class 'summary.mst_completion_graph'
print(x, digits = 3L, ...)

Arguments

x

An object of class summary.mst_completion_graph, as returned by summary.mst_completion_graph.

digits

Integer; number of significant digits for numeric output. Default is 3.

...

Additional arguments (currently ignored).

Value

Invisibly returns the input summary object.

Examples

graph <- list(
  mst_adj_list = list(c(2L), c(1L, 3L), c(2L)),
  mst_weight_list = list(1.1, c(1.1, 0.9), 0.9),
  cmst_adj_list = list(c(2L, 3L), c(1L, 3L), c(1L, 2L)),
  cmst_weight_list = list(c(1.1, 1.4), c(1.1, 0.9), c(1.4, 0.9)),
  mst_edge_weights = c(1.1, 0.9),
  cmst_distance_threshold = 1.08
)
attr(graph, "q_thld") <- 0.8
attr(graph, "cmst_distance_threshold") <- graph$cmst_distance_threshold
class(graph) <- c("mst_completion_graph", "list")

graph_summary <- summary(graph)
print(graph_summary, digits = 4)


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