_iterator vertice_row_it = vertices.begin (); _row_it! = vertices.end (); + + vertice_row_it)
{(T_vertices :: const_iterator vertice_col_it = vertices.begin (); _col_it! = vertices.end (); + + vertice_col_it)
{<<' t'
<
} :: cout <
<
<
}
}
/* введення вершин */_vertices get_vertices (const T_edges & edges)
{_vertices_set vertices_set; (T_edges :: const_iterator edge_it = edges.begin (); edge_it! = edges.end ();
+ + edge_it)
{_set.insert (* edge_it-> begin ()); _set.insert (* edge_it-> rbegin ());
} T_vertices (vertices_set.begin (), vertices_set.end ());
}
/* отримання матриці суміжності */_matr get_adjacency_matr (const T_edges & edges)
{_matr adjacency_matr; (T_edges :: const_iterator edge_it = edges.begin (); edge_it! = edges.end ();
+ + edge_it)
{_vertice v1 = * edge_it-> begin (); _vertice v2 = * edge_it-> rbegin ();
_matr [v1] [v2] = adjacency_matr [v2] [v1] = true;
} adjacency_matr;
}
/* елементарні цикли */print_cycles
(T_vertices vertices, _matr & adjacency_matr, _vertices & spanning_tree, _vertice_time & vertice_time, & time, _vertice vertice_U
)
{_tree.push_back (vertice_U); _time [vertice_U] = + + time;
(T_vertices :: const_iterator vertice_V_it = vertices.begin (); _V_it! = vertices.end (); + + vertice_V_it)
{(adjacency_matr [vertice_U] [* vertice_V_it])
{(vertice_time [* vertice_V_it] == ​​0)
{_cycles
(, _matr, _tree, _time,,
* vertice_V_it
);
}
{(* vertice_V_it! = * (spanning_tree.rbegin () + 1)
&& vertice_time [* vertice_V_it]
{:: cout <<"Elementarnii tsikl:"
<
(T_vertices :: const_iterator _vertice_it
= std :: find (spanning_tree.begin (), spanning_tree.end (), * vertice_V_it); _vertice_it! = spanning_tree.end (); + + tree_vertice_it)
{:: cout <<* tree_vertice_it
<
}
:: cout <
}
}
...