fn find_cyclic_route(
    vertex: usize,
    vv: &core::graph::VertexVec<atom::Atom>,
    max_size: usize
) -> Vec<usize> {
    let mut cyclic_route: Vec<usize> = vec![0; max_size + 1];
    for &neighbour in vv[vertex].neighbour_indexes().iter() {
        match core::cycle_ops::find_cycle_for_vertices(vertex, neighbour, vv, max_size) {
            Some(cr) => {
                if cr.len() < cyclic_route.len() {
                    cyclic_route = cr
                }
            },
            None => ()
        }
    }

    cyclic_route
}
/// Find the cycle including the vertex with minimum size
Find the cycle including the vertex with minimum size
Find the cycle including the vertex with minimum size
fn find_cyclic_route(
    vertex: usize,
    vv: &core::graph::VertexVec<atom::Atom>,
    max_size: usize
) -> Vec<usize> {
    let mut cyclic_route: Vec<usize> = vec![0; max_size + 1];
    for &neighbour in vv[vertex].neighbour_indexes().iter() {
        match core::cycle_ops::find_cycle_for_vertices(vertex, neighbour, vv, max_size) {
            Some(cr) => {
                if cr.len() < cyclic_route.len() {
                    cyclic_route = cr
                }
            },
            None => ()
        }
    }
    cyclic_route
}
fn find_cyclic_route ( vertex : usize , vv : & core :: graph :: VertexVec < atom :: Atom > , max_size : usize ) -> Vec < usize > { let mut cyclic_route : Vec < usize > = vec ! [ 0 max_size 1 ] ; for & neighbour in vv [ vertex ] . neighbour_indexes ( ) . iter ( ) { match core :: cycle_ops :: find_cycle_for_vertices ( vertex , neighbour , vv , max_size ) { Some ( cr ) => { if cr . len ( ) < cyclic_route . len ( ) { cyclic_route = cr } } , None => ( ) } } cyclic_route }
Find the cycle including the vertex with minimum size
Find the cycle including the vertex with minimum size
vertex
usize
vv
&core::graph::VertexVec<atom::Atom>
max_size
usize
vertex
usize
vv
&core::graph::VertexVec<atom::Atom>
max_size
usize