pub fn new(grid: [usize; 3],
               lattice: [[f64; 3]; 3],
               voxel_origin: [f64; 3])
               -> Self {
        let grid = Grid::new(grid, lattice, voxel_origin);
        let size = grid.size.total;
        // For mapping the the voxels
        let weight_map = UnsafeCell::new(Vec::<Vec<f64>>::with_capacity(size));
        let mut voxel_map = Vec::with_capacity(size);
        voxel_map.resize_with(size, || AtomicIsize::new(-1));
        let lock = AtomicBool::new(false);
        // For post processing
        Self { weight_map,
               voxel_map,
               grid,
               lock }
    }
/// Initialises a VoxelMap and the bader::grid::Grid that will faciliate movemoment around the
/// map.
Initialises a VoxelMap and the bader::grid::Grid that will faciliate movemoment around the
map.
Initialises a VoxelMap and the bader :: grid :: Grid that will faciliate movemoment around the map .
pub fn new(grid: [usize; 3],
               lattice: [[f64; 3]; 3],
               voxel_origin: [f64; 3])
               -> Self {
        let grid = Grid::new(grid, lattice, voxel_origin);
        let size = grid.size.total;
        // For mapping the the voxels
        let weight_map = UnsafeCell::new(Vec::<Vec<f64>>::with_capacity(size));
        let mut voxel_map = Vec::with_capacity(size);
        voxel_map.resize_with(size, || AtomicIsize::new(-1));
        let lock = AtomicBool::new(false);
        // For post processing
        Self { weight_map,
               voxel_map,
               grid,
               lock }
    }
pub fn new ( grid : [ usize ; 3 ] , lattice : [ [ f64 ; 3 ] ; 3 ] , voxel_origin : [ f64 ; 3 ] ) -> Self { let grid = Grid :: new ( grid , lattice , voxel_origin ) ; let size = grid . size . total ; // For mapping the the voxels let weight_map = UnsafeCell :: new ( Vec :: < Vec < f64 > > :: with_capacity ( size ) ) ; let mut voxel_map = Vec :: with_capacity ( size ) ; voxel_map . resize_with ( size , | | AtomicIsize :: new ( - 1 ) ) ; let lock = AtomicBool :: new ( false ) ; // For post processing Self { weight_map , voxel_map , grid , lock } }
Initialises a VoxelMap and the bader::grid::Grid that will faciliate movemoment around the
map.
Initialises a VoxelMap and the bader :: grid :: Grid that will faciliate movemoment around the map .
grid
[usize; 3]
lattice
[[f64; 3]; 3]
voxel_origin
[f64; 3]
grid
[usize; 3]
lattice
[[f64; 3]; 3]
voxel_origin
[f64; 3]