/// Extend on edge in the graph, store all the cyclic routes and the open routes
Extend on edge in the graph, store all the cyclic routes and the open routes
Extend on edge in the graph store all the cyclic routes and the open routes
fn extend_one_edge<T: graph::Vertex>(
    open_route: &Vec<usize>,
    vv: &graph::VertexVec<T>,
    cyclic_routes: &mut Vec<Vec<usize>>,
    open_routes: &mut Vec<Vec<usize>>
) {
    let length = open_route.len();
    for ni in vv[open_route[length - 1]].neighbour_indexes() {
        if open_route.contains(&ni) {
            if (ni == open_route[0]) && (open_route.len() > 2) {
                cyclic_routes.push(open_route.clone());
            }
        } else {
            let mut indexes_tmp = open_route.clone();
            indexes_tmp.push(ni);
            open_routes.push(indexes_tmp);
        }
    }
}
fn extend_one_edge < T : graph :: Vertex > ( open_route : & Vec < usize > , vv : & graph :: VertexVec < T > , cyclic_routes : & mut Vec < Vec < usize > > , open_routes : & mut Vec < Vec < usize > > ) { let length = open_route . len ( ) ; for ni in vv [ open_route [ length - 1 ] ] . neighbour_indexes ( ) { if open_route . contains ( & ni ) { if ( ni == open_route [ 0 ] ) && ( open_route . len ( ) > 2 ) { cyclic_routes . push ( open_route . clone ( ) ) ; } } else { let mut indexes_tmp = open_route . clone ( ) ; indexes_tmp . push ( ni ) ; open_routes . push ( indexes_tmp ) ; } } }
Extend on edge in the graph, store all the cyclic routes and the open routes
Extend on edge in the graph store all the cyclic routes and the open routes
open_route
&Vec<usize>
vv
&graph::VertexVec<T>
cyclic_routes
&mut Vec<Vec<usize>>
open_routes
&mut Vec<Vec<usize>>