pub fn new(dimensions: usize, state: S) -> (Self, ID) {
        let mut graph = UnGraphMap::new();
        let mut spaces = HashMap::new();
        let mut space_ids = HashSet::new();
        let id = ID::new();
        graph.add_node(id);
        spaces.insert(id, Space::new(id, state));
        space_ids.insert(id);
        let qdf = Self {
            id: ID::new(),
            graph,
            spaces,
            space_ids,
            dimensions,
        };
        (qdf, id)
    }
/// Creates new QDF information universe.
///
/// # Arguments
/// * `dimensions` - Number of dimensions space contains.
/// * `state` - State of space.
///
/// # Returns
/// Tuple of new QDF object and space id.
///
/// # Examples
/// ```
/// use quantized_density_fields::QDF;
///
/// // Creates 2d space with `9` as root state.
/// let (qdf, root) = QDF::new(2, 9);
/// assert_eq!(*qdf.space(root).state(), 9);
/// ```
Creates new QDF information universe.
Creates new QDF information universe .
pub fn new(dimensions: usize, state: S) -> (Self, ID) {
        let mut graph = UnGraphMap::new();
        let mut spaces = HashMap::new();
        let mut space_ids = HashSet::new();
        let id = ID::new();
        graph.add_node(id);
        spaces.insert(id, Space::new(id, state));
        space_ids.insert(id);
        let qdf = Self {
            id: ID::new(),
            graph,
            spaces,
            space_ids,
            dimensions,
        };
        (qdf, id)
    }
pub fn new ( dimensions : usize , state : S ) -> ( Self , ID ) { let mut graph = UnGraphMap :: new ( ) ; let mut spaces = HashMap :: new ( ) ; let mut space_ids = HashSet :: new ( ) ; let id = ID :: new ( ) ; graph . add_node ( id ) ; spaces . insert ( id , Space :: new ( id , state ) ) ; space_ids . insert ( id ) ; let qdf = Self { id : ID :: new ( ) , graph , spaces , space_ids , dimensions , } ; ( qdf , id ) }
Creates new QDF information universe.
Creates new QDF information universe .
dimensions
usize
state
S
Tuple of new QDF object and space id.
Tuple of new QDF object and space id .
dimensions
usize
state
S
examples
```
use quantized_density_fields::QDF.

Creates 2d space with `9` as root state.
` ` ` use quantized_density_fields :: QDF . Creates 2d space with ` 9 ` as root state .