Print Graph Constructor Results
Source:R/radius_graphs.R, R/sknn_graphs.R
print.graph.constructors.RdPrint Graph Constructor Results
Usage
# S3 method for class 'radius_graph'
print(x, ...)
# S3 method for class 'cknn_graph'
print(x, ...)
# S3 method for class 'rknn_graphs'
print(x, ...)
# S3 method for class 'adaptive_radius_graph'
print(x, ...)
# S3 method for class 'sknn_graphs'
print(x, ...)
# S3 method for class 'sknn_graph'
print(x, ...)Value
The input object x, invisibly and unchanged. Prints vertex and
edge counts, construction parameters, and connectivity information when
present; for a sequence, prints the graph count and neighborhood sizes.
Examples
X <- cbind(seq_len(8), sin(seq_len(8)))
print(create.rknn.graph(X, type = "fixed", radius = 2))
#> Fixed-radius graph
#> Number of vertices: 8
#> Number of edges: 7
#> Radius: 2
#> Connected components before MST augmentation: 1
#> Connected components after MST augmentation: 1
print(create.cknn.graph(X, k.scale = 2))
#> Continuous-kNN graph
#> Number of vertices: 8
#> Number of edges: 7
#> k.scale: 2
#> Delta:
#> Connected components before MST augmentation: 1
#> Connected components after MST augmentation: 1
print(create.rknn.graph(X, type = "adaptive.radius", k.scale = 2))
#> Adaptive-radius graph
#> Number of vertices: 8
#> Number of edges: 9
#> k.scale: 2
#> Radius factor: 1
#> Radius rule: max
#> Radius search: ann
#> Connected components before MST augmentation: 1
#> Connected components after MST augmentation: 1
print(create.rknn.graphs(X, k.values = seq.int(2, 3)))
#> Adaptive-radius graph sequence
#> Number of vertices: 8
#> Number of graphs: 2
#> k values: 2, 3
print(create.sknn.graph(X, k = 2))
#> Symmetric kNN graph
#> Number of vertices: 8
#> Number of edges: 9
#> k: 2
#> Connected components before MST augmentation: 1
#> Connected components after MST augmentation: 1
#> Neighbor method: exact