distance¶
Import in python using from mcot.core._scripts.surface.gradient import distance
-
mcot.core._scripts.surface.gradient.distance(graph, features, metric='euclidean')[source]¶ Computes the distance between neighbouring feature sets
Parameters: - graph – (N, N) sparse matrix indicating which features are neighbouring
- features – (N, M) for M features defined at N locations
- metric – which distance operator to use (one of dist_options)
Returns: (N, N) sparse matrix with the distance between each feature pair (same structure as graph)