CellLists.jl
Documentation for CellLists.jl
Serial
CellLists.CellList
— TypeCellList type. The indices
dictionary maps the CartesianIndex
of each cell to the indices of points in that cell.
CellLists.CellList
— MethodConstruct CellList from points p
and radius r>0
.
Examples
n, d, r = 100, 2, 0.01
p = rand(n, d)
c = CellLists(p, r)
CellLists.near_neighbors
— MethodReturn a vector of all pairs that are in neighboring cells in the cell list.
Examples
julia> near_neighbors(c, p, r)
[(1, 4), (3, 11), ...]
Multithreading
Base.merge
— MethodMerge two CellList{d}
s with same dimension d
.
Examples
n, d, r = 100, 2, 0.01
p = (rand(n, d), rand(n, d))
merge(CellList(p[1], r), CellList(p[2], r))
CellLists.CellList
— MethodMultithreaded CellList constructor.
Examples
n, d, r = 100, 2, 0.01
p = rand(n, d)
c = CellList(p, r, Val(:threads))
CellLists.near_neighbors
— MethodMultithreaded near neighbors.
Examples
julia> near_neighbors(c, p, r, Val(:threads))
[(1, 4), (3, 11), ...]