View source: R/geodesic_iknn_graphs.R
| create.geodesic.iknn.graph | R Documentation |
Rebuilds an iKNN graph from an existing weighted graph by using graph
geodesic distances in place of Euclidean distances. For every vertex i,
the graph-metric neighbor set contains the first k finite graph-geodesic
nearest vertices under the same convention used by create.iknn.graphs().
Because self-distance is zero, this includes i whenever i is finite from
itself. Vertices i and j are connected in the returned graph when those
two neighbor sets intersect.
create.geodesic.iknn.graph(graph, k)
graph |
A weighted graph list with entries |
k |
Integer number of graph-metric nearest vertices in each neighbor
set, matching the |
A list with entries:
1-based adjacency list for the final graph.
Final graph-geodesic edge lengths from the input graph.
The native geodesic iKNN graph.
Identical to raw_*
because geodesic iKNN graphs do not currently have a pruning stage.
Lifecycle aliases identical to the final graph because this constructor has no MST repair or pruning stage.
Intersection sizes for each edge.
Number of undirected edges.
graph <- list(
adj_list = list(2L, c(1L, 3L), 2L),
weight_list = list(1, c(1, 1), 1)
)
create.geodesic.iknn.graph(graph, k = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.