Prints a formatted, comprehensive summary of a gradient flow basin complex, including detailed statistics about extrema, basins, basin overlaps, and cell complex structure.
Usage
# S3 method for class 'summary.basin_cx'
print(x, ...)Arguments
- x
An object of class "summary.basin_cx" as created by
summary.basin_cx.- ...
Additional arguments passed to print methods (currently unused).
Value
Invisibly returns the input summary object x. This function is called
for its side effect of printing detailed information to the console.
Details
The print method displays the following sections:
Extrema: Total counts of local extrema, broken down by minima and maxima.
Local Minima/Maxima Information: Tables showing each extremum with its vertex index, label, basin size, and function value. Minima are sorted by increasing function value, maxima by decreasing function value.
Basins: Counts of merged ascending (minimum) and descending (maximum) basins, along with size statistics.
Basin Size Statistics: Summary statistics (min, quartiles, mean, max) for the number of vertices in each type of basin.
Cell Complex Summary: Total number of cells and breakdown by type (ascending-descending, ascending-ascending, descending-descending).
Jaccard Index Matrices: Matrices showing pairwise Jaccard indices (overlap measures) between basins of the same type, rounded to 3 decimal places.
Messages: Any informational messages generated during basin complex creation.
See also
summary.basin_cx for creating summary objects,
create.basin.cx for creating basin complex objects,
print.basin_cx for basic basin complex printing
Examples
basin_cx <- list(
basins = list(
ascending = list(
m1 = list(vertex = 2L, value = 0.7, vertices = c(1L, 2L)),
m2 = list(vertex = 5L, value = 1.1, vertices = c(4L, 5L))
),
descending = list(
M1 = list(vertex = 3L, value = 3.2, vertices = c(2L, 3L, 4L))
)
),
local_extrema = data.frame(
vertex_index = c(2L, 5L, 3L),
label = c("m1", "m2", "M1"),
is_maximum = c(0, 0, 1),
fn_value = c(0.7, 1.1, 3.2)
),
original_y = c(2.5, 0.7, 3.2, 1.8, 1.1),
cells = list(
asc_desc_cells = list(c1 = list(vertices = c(2L, 3L))),
asc_asc_cells = list(),
desc_desc_cells = list()
)
)
class(basin_cx) <- "basin_cx"
basin_summary <- summary(basin_cx)
basin_summary