Model.element_nnbrs

Model.element_nnbrs(element, k=1)

Find the nearest neighbours to a root element.

Parameters:
elementElement

The root element.

kint, optional

The number of nearest neighbours that should be returned.

Returns:
list[tuple[Element, float]]

A list of nearest neighbours, with each neighbour defined as an element and the distance of that element to the root element.