xnn.common.data.neighborlist.nearest_edges#
- xnn.common.data.neighborlist.nearest_edges(dist, dst, num_nodes, k)[source]#
The edges to the
knearest neighbors of every receiving atom.- Parameters:
- Returns:
keep (Tensor or None) – Indices of the kept edges, grouped by receiving atom and, where an atom had more than
k, by length (edges of equal length keep their order in the neighbor list);Nonekeeps every edge where it is (withper_atom, the edges are already grouped by receiving atom).per_atom (int or None) – The number of kept edges of every atom when it is the same for all: the kept edges are then a table of
per_atomrows per atom.
- Return type: