MEDYAN.CubicGrid
Base.length
MEDYAN.grididat
MEDYAN.filter_grididat
MEDYAN.centerof
MEDYAN.randompoint
CubicGrid(num_voxels::SVector{3,Int}, compartmentsize::Float64)
n::StaticArraysCore.SVector{3, Int64}
compartmentsize::Float64
Base.length(grid::CubicGrid)
Total number of compartments in the grid
grididat(grid::CubicGrid, location)
Return the grid id of location The origin is in the center. Returns a close by voxel if out of the grid
filter_grididat(f, grid::CubicGrid, location)
Return the nearest grid id of location where f(id) evaluates to true. The origin is in the center. errors if there is no id that evaluates to true. Returns a close by voxel if out of the grid.
centerof(grid::CubicGrid, cid)
Return the location of the center of a grid id The origin is in the center.
centerof(grid::CubicGrid)
Return the location of the center the grid The origin is in the center.
randompoint(grid::CubicGrid,cid)::SVector{3,Float64}
Return a random point in a voxel Note, due to floating point rounding, there is a small chance the returned point may be in a nearby voxel.
randompoint(grid::CubicGrid)::SVector{3,Float64}
Return a random point in the grid