Skip to main content

pairs_within_unsorted

Function pairs_within_unsorted 

Source
pub fn pairs_within_unsorted(
    positions: &[[f32; 3]],
    left: &AtomSelection,
    right: &AtomSelection,
    cutoff: f32,
    backend: SpatialBackend,
    periodic: Option<&PeriodicBox>,
    context: &ExecutionContext,
) -> Result<Vec<NeighborPair>, SpatialError>
Expand description

Enumerates unique same-selection pairs without sorting the returned vector.

The deterministic ordering contract of pairs_within remains unchanged. This variant is intended for reductions such as histograms and counts that do not consume pair order. For different left and right selections it keeps the canonical implementation so overlapping selections remain duplicate-free.

ยงErrors

Returns the same validation and backend errors as pairs_within.