Build an nearest-neighbor graph weighted by distance.
Convert an edge matrix to a dist
object.
buildEdgeMatrix(data, neighbors = NULL, distance_method = "Euclidean",
threads = NULL, verbose = getOption("verbose", TRUE), ...)# S3 method for edgematrix
as.dist(m, diag = FALSE, upper = FALSE)
A matrix with a number of columns equal to the number of columns in `x`
An adjacency matrix of the type produced by randomProjectionTreeSearch
. If NULL
, randomProjectionTreeSearch
will be run with parameters given by ...
.
One of "Euclidean" or "Cosine"
The number of threads to use in calculating distance; set automatically if NULL
(the default).
Verbosity
Additional parameters passed to randomProjectionTreeSearch
if neighbors
is NULL
.
An `edgematrix` object.
logical value indicating whether the diagonal of the distance matrix should be printed by print.dist.
logical value indicating whether the upper triangle of the distance matrix should be printed by print.dist.
An `edgematrix` object consisting of the elements of a sparse matrix, with the distance method stored in attribute method
.
A dist
object.