pub fn new(dimensions: usize, count: usize, root_state: S) -> Self {
        let mut graph = UnGraphMap::new();
        let mut levels = HashMap::new();
        let mut platonic_levels = HashSet::new();
        let root = ID::new();
        let main = Level::new(root, None, 0, 0, root_state);
        levels.insert(root, main);
        graph.add_node(root);
        Self::subdivide_level(root, &mut graph, &mut levels, dimensions + 2, count);
        Self::connect_clusters(root, &mut graph, &levels);
        Self::collect_platonic_levels(root, &levels, &mut platonic_levels);
        Self {
            id: ID::new(),
            graph,
            levels,
            platonic_levels,
            root,
            dimensions,
            count,
        }
    }
/// Creates new LOD information universe.
///
/// # Arguments
/// * `dimensions` - Number of dimensions which space contains.
/// * `count` - Number of levels.
/// * `root_state` - State of root level.
///
/// # Examples
/// ```
/// use quantized_density_fields::LOD;
///
/// // Create 2D space with 1 level of details and `16` as root space.
/// let lod = LOD::new(2, 1, 16);
/// assert_eq!(*lod.state(), 16);
/// // LOD has 4 children level objects.
/// assert_eq!(lod.level(lod.root()).sublevels().len(), 4);
/// // sampled state at level 1 equals to `4` (`16 / 4`).
/// assert_eq!(*lod.level(lod.level(lod.root()).sublevels()[0]).state(), 4);
/// ```
Creates new LOD information universe.
Creates new LOD information universe .
pub fn new(dimensions: usize, count: usize, root_state: S) -> Self {
        let mut graph = UnGraphMap::new();
        let mut levels = HashMap::new();
        let mut platonic_levels = HashSet::new();
        let root = ID::new();
        let main = Level::new(root, None, 0, 0, root_state);
        levels.insert(root, main);
        graph.add_node(root);
        Self::subdivide_level(root, &mut graph, &mut levels, dimensions + 2, count);
        Self::connect_clusters(root, &mut graph, &levels);
        Self::collect_platonic_levels(root, &levels, &mut platonic_levels);
        Self {
            id: ID::new(),
            graph,
            levels,
            platonic_levels,
            root,
            dimensions,
            count,
        }
    }
pub fn new ( dimensions : usize , count : usize , root_state : S ) -> Self { let mut graph = UnGraphMap :: new ( ) ; let mut levels = HashMap :: new ( ) ; let mut platonic_levels = HashSet :: new ( ) ; let root = ID :: new ( ) ; let main = Level :: new ( root , None , 0 , 0 , root_state ) ; levels . insert ( root , main ) ; graph . add_node ( root ) ; Self :: subdivide_level ( root , & mut graph , & mut levels , dimensions + 2 , count ) ; Self :: connect_clusters ( root , & mut graph , & levels ) ; Self :: collect_platonic_levels ( root , & levels , & mut platonic_levels ) ; Self { id : ID :: new ( ) , graph , levels , platonic_levels , root , dimensions , count , } }
Creates new LOD information universe.
Creates new LOD information universe .
dimensions
usize
count
usize
root_state
S
dimensions
usize
count
usize
root_state
S
examples
```
use quantized_density_fields::LOD.

Create 2D space with 1 level of details and `16` as root space.
let lod = LOD::new(2, 1, 16);
assert_eq!(*lod.state(), 16);
LOD has 4 children level objects.
assert_eq!(lod.level(lod.root()).sublevels().len(), 4);
sampled state at level 1 equals to `4` (`16 / 4`).
` ` ` use quantized_density_fields :: LOD . Create 2D space with 1 level of details and ` 16 ` as root space . let lod = LOD :: new ( 2 1 16 ) ; assert_eq! ( * lod . state () 16 ) ; LOD has 4 children level objects . assert_eq! ( lod . level ( lod . root () ) . sublevels () . len () 4 ) ; sampled state at level 1 equals to ` 4 ` ( ` 16 / 4 ` ) .