1. A method for mapping an environment by an electronic device, the method comprising: obtaining a set of sensor measurements comprising at least one of depth measurements or image data; determining a set of voxel occupancy probability distributions respectively corresponding to a set of voxels based on the set of sensor measurements, wherein each of the voxel occupancy probability distributions represents a probability of occupancy of a voxel over a range of occupation densities, wherein the range comprises partial occupation densities; and updating the set of voxel occupancy probability distributions based on an affine function.