fn continuos_id_map(&self) -> IdMap {
        let mut id_map = IdMap::init(self.vertex_count());

        // Map each vertex id to its index in vector returned by vertices.
        self.vertices()
            .iter()
            .enumerate()
            .for_each(|(virt_id, &real_id)| {
                id_map.put_virt_to_real(virt_id, real_id);
                id_map.put_real_to_virt(real_id, virt_id);
            });

        id_map
    }
/// In many algorithms assuming graph vertices have a continuos series of ids makes implementing the algorithms easier.
/// So this function maps potentially scattered vertex ids into a continuos one.
/// In this mapping, scattered ids are real and continuos ones are virtual.
///
/// For example: \
/// if vertex ids are [1, 3, 4], they will be mapped to [0, 1, 2] so you can store information about vertices in a vector and use the new vertex ids as index.
///
/// # Returns
/// The two-way mapping between scattered and continuos ids.
In many algorithms assuming graph vertices have a continuos series of ids makes implementing the algorithms easier.
So this function maps potentially scattered vertex ids into a continuos one.
In this mapping, scattered ids are real and continuos ones are virtual.

For example: \
if vertex ids are [1, 3, 4], they will be mapped to [0, 1, 2] so you can store information about vertices in a vector and use the new vertex ids as index.
In many algorithms assuming graph vertices have a continuos series of ids makes implementing the algorithms easier . So this function maps potentially scattered vertex ids into a continuos one . In this mapping scattered ids are real and continuos ones are virtual . For example : \ if vertex ids are [ 1 3 4 ] they will be mapped to [ 0 1 2 ] so you can store information about vertices in a vector and use the new vertex ids as index .
fn continuos_id_map(&self) -> IdMap {
        let mut id_map = IdMap::init(self.vertex_count());
        // Map each vertex id to its index in vector returned by vertices.
        self.vertices()
            .iter()
            .enumerate()
            .for_each(|(virt_id, &real_id)| {
                id_map.put_virt_to_real(virt_id, real_id);
                id_map.put_real_to_virt(real_id, virt_id);
            });
        id_map
    }
fn continuos_id_map ( & self ) -> IdMap { let mut id_map = IdMap :: init ( self . vertex_count ( ) ) ; // Map each vertex id to its index in vector returned by vertices. self . vertices ( ) . iter ( ) . enumerate ( ) . for_each ( | ( virt_id , & real_id ) | { id_map . put_virt_to_real ( virt_id , real_id ) ; id_map . put_real_to_virt ( real_id , virt_id ) ; } ) ; id_map }
In many algorithms assuming graph vertices have a continuos series of ids makes implementing the algorithms easier.
In many algorithms assuming graph vertices have a continuos series of ids makes implementing the algorithms easier .
&self
The two-way mapping between scattered and continuos ids.
The two - way mapping between scattered and continuos ids .
&self