Skip to main content

lc_cell_graph

Function lc_cell_graph 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn lc_cell_graph( xyz: *const f64, n: usize, simbox: *const lc_cell, cutoff: f64, mask: *const c_int, cell_hint: f64, out_nxyz: *mut c_int, out_width: *mut f64, out_weight: *mut u64, out_offsets: *mut u32, out_neighbor: *mut u32, out_edge: *mut u64, cap_weight: usize, cap_arcs: usize, out_ncell: *mut usize, out_arcs: *mut usize, ) -> c_int
Expand description

Periodic cell adjacency. Edge weights are pair counts from lc_pairs_within with half set.

A null out_weight queries *out_ncell and *out_arcs and returns 0. Otherwise every output buffer is required. cap_weight is the cell capacity and cap_arcs is the arc capacity. out_offsets has length ncell + 1.

ยงSafety

Same point contract as lc_cell_grid. On a fill, out_offsets is writable for ncell + 1 counts, out_neighbor and out_edge for out_arcs entries.