print.mst_completion_graph: Print Method for MST Completion Graph Objects

View source: R/mst_completion_graphs.R

print.mst_completion_graphR Documentation

Print Method for MST Completion Graph Objects

Description

Displays a concise summary of an MST completion graph object, including basic graph statistics and parameter information.

Usage

## S3 method for class 'mst_completion_graph'
print(x, ...)

Arguments

x

An object of class mst_completion_graph, as returned by create.cmst.graph.

...

Additional arguments (currently ignored).

Details

This method provides a human-readable overview of the graph structure without displaying the full adjacency lists. For detailed inspection of graph components, use direct indexing (e.g., x$mst_adj_list) or the summary method.

Value

Invisibly returns the input object x.

See Also

summary.mst_completion_graph for more detailed summaries, create.cmst.graph for creating MST completion graphs

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")

print(graph)


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