get_distance_matrix {fdasrvf} | R Documentation |
Computes the distance matrix between a set of shapes.
Description
Computes the distance matrix between a set of shapes.
Usage
get_distance_matrix(
qfuns,
alignment = FALSE,
rotation = FALSE,
scale = FALSE,
lambda = 0,
M = 200L,
parallel_setup = 1L
)
Arguments
qfuns |
A list of functions representing the shapes. Each function
should be a SRVF. See |
alignment |
A boolean value specifying whether the two SRVFs should be
optimally aligned before computing the distance. Defaults to |
rotation |
A boolean value specifying whether the two SRVFs should be
optimally rotated before computing the distance. Defaults to |
scale |
A boolean value specifying whether the two SRVFs should be
projected onto the Hilbert sphere before computing the distance. Defaults
to |
lambda |
A numeric value specifying the regularization parameter for the
optimal alignment. Defaults to |
M |
An integer value specifying the number of points to use when
searching for the optimal rotation and alignment. Defaults to |
parallel_setup |
An integer value specifying the number of cores to use
for parallel computing or an object of class |
Value
An object of class dist
containing the distance matrix between the
shapes.
Examples
N <- 4L
srvfs <- lapply(1:N, \(n) curve2srvf(beta[, , 1, n]))
get_distance_matrix(srvfs, parallel_setup = 1L)