Learn R Programming

lgspline (version 0.2.0)

find_neighbors: Find Neighboring Cluster Partitions Using Midpoint Distance Criterion

Description

Identifies neighboring partitions by evaluating whether the midpoint between cluster centers is closer to those centers than to any other center.

Usage

find_neighbors(centers, parallel, cl, neighbor_tolerance)

Value

List where element i contains indices of centers neighboring center i

Arguments

centers

Matrix; rows are cluster center coordinates

parallel

Logical; use parallel processing

cl

Cluster object for parallel execution

neighbor_tolerance

Numeric; scaling factor for distance comparisons