`getDist()` computes a distance matrix from a data matrix `X` using either standard Euclidean-based distances or correlation-based distances. The function supports: * squared Euclidean distance, * standard distances from `stats::dist()`, and * correlation-based distances, computed as `1 - cor(X)` with user-specified correlation methods.
This helper function is used throughout the PART algorithm to construct distance matrices for hierarchical clustering and threshold computations.
getDist(X, dist.method, cor.method = "pearson")A numeric data matrix where rows represent observations and columns represent features.
A character string specifying which distance metric to use. Supported options: * `"sq.euclidean"` — squared Euclidean distance, * `"cor"` — correlation-based distance, * any other string accepted by `stats::dist()` (e.g., `"euclidean"`, `"manhattan"`, `"maximum"`, etc.).
Method for computing correlations when `dist.method = "cor"`. Passed to `stats::cor()`. Options include `"pearson"` (default), `"spearman"`, or `"kendall"`.