Skip to contents

Computes the sum of pairwise Euclidean distances between cell type expression profiles. Higher values indicate more distinct profiles.

Usage

compute_distance(data, use_cpp = getOption("darwin.use_cpp", TRUE))

Arguments

data

Numeric matrix (cell types x genes).

use_cpp

Use C++ implementation for speed. Default: TRUE.

Value

Sum of pairwise Euclidean distances between rows.

Examples

data <- matrix(rnorm(50), nrow = 5, ncol = 10)
dist_val <- compute_distance(data)