View source: R/ETDQualitizer.R
| frechet_median_on_sphere | R Documentation |
Finds the unit direction that minimizes the sum of angular distances to a collection of 3D direction vectors. Non-finite rows are ignored.
frechet_median_on_sphere(vectors, tol = 1e-12, max_iter = 128)
vectors |
Numeric matrix with three columns containing 3D direction vectors. |
tol |
Convergence tolerance (default: 1e-12). |
max_iter |
Maximum number of optimization iterations (default: 128). |
A numeric vector of length three containing the spherical Frechet median, or three NaNs if no finite vectors are provided.
frechet_median_on_sphere(rbind(c(0, 0, 1), c(0, 0, 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.