pub struct VoxelMap {
pub voxel_map: Vec<isize>,
pub weight_map: Vec<Box<[f64]>>,
pub grid: Grid,
}
Expand description
A VoxelMap for if the maxima stored are atomic indices.
Fields§
§voxel_map: Vec<isize>
The vector mapping the voxel to a maxima.
weight_map: Vec<Box<[f64]>>
The vector containing the weights for boundary voxels.
grid: Grid
The Grid used to navigate the VoxelMap.
Implementations§
source§impl VoxelMap
impl VoxelMap
sourcepub fn new(
voxel_map: Vec<isize>,
weight_map: Vec<Box<[f64]>>,
grid: Grid
) -> Self
pub fn new( voxel_map: Vec<isize>, weight_map: Vec<Box<[f64]>>, grid: Grid ) -> Self
Create a new VoxelMap
sourcepub fn from_blocking_voxel_map(voxel_map: BlockingVoxelMap) -> Self
pub fn from_blocking_voxel_map(voxel_map: BlockingVoxelMap) -> Self
Create a new VoxelMap
from a BlockingVoxelMap
.
sourcepub fn weight_iter(&self) -> Iter<'_, Box<[f64]>>
pub fn weight_iter(&self) -> Iter<'_, Box<[f64]>>
Produce an Iter over the boundary voxels.
sourcepub fn weight_len(&self) -> usize
pub fn weight_len(&self) -> usize
Get the length of the weight_map.
sourcepub fn maxima_to_atom(&self, maxima: usize) -> usize
pub fn maxima_to_atom(&self, maxima: usize) -> usize
Returns the atom associated with the point.
sourcepub fn maxima_to_voxel(&self, maxima: isize) -> Voxel<'_>
pub fn maxima_to_voxel(&self, maxima: isize) -> Voxel<'_>
Retrieval of the state of the voxel, p.
sourcepub fn maxima_to_weight(&self, maxima: isize) -> &[f64]
pub fn maxima_to_weight(&self, maxima: isize) -> &[f64]
Return a reference to the weights from the given maxima, Note: maxima here must be < -1.
sourcepub fn maxima_iter(&self) -> Iter<'_, isize>
pub fn maxima_iter(&self) -> Iter<'_, isize>
Return an Iter over the maxima stored in the VoxelMap.
sourcepub fn maxima_len(&self) -> usize
pub fn maxima_len(&self) -> usize
Get the length of the voxel_map.
sourcepub fn maxima_chunks(&self, chunk_size: usize) -> Chunks<'_, isize>
pub fn maxima_chunks(&self, chunk_size: usize) -> Chunks<'_, isize>
Return a Chunk over the maxima stored in the VoxelMap.
sourcepub fn maxima_get(&self, p: isize) -> isize
pub fn maxima_get(&self, p: isize) -> isize
Return the stored maxima at point p.
Auto Trait Implementations§
impl RefUnwindSafe for VoxelMap
impl Send for VoxelMap
impl Sync for VoxelMap
impl Unpin for VoxelMap
impl UnwindSafe for VoxelMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more