Learn R Programming

WOAkMedoids (version 0.2.2)

projectToIndex_cpp: Project MDS coordinates to nearest unique sample indices

Description

Finds the nearest sample in the MDS embedded space for each medoid coordinate, while enforcing a one-to-one mapping between medoids and samples (no duplicates).

Usage

projectToIndex_cpp(medoid_coords, Z)

Value

IntegerVector of nearest unique sample indices (1-indexed, length = ClusNum)

Arguments

medoid_coords

NumericMatrix of medoid coordinates in MDS space (ClusNum x mds_dim)

Z

NumericMatrix of sample coordinates in MDS space (nrows x mds_dim)