/usr/include/boost/graph
NameSizeModeActions
detail/-0755rm
distributed/-0755rm
parallel/-0755rm
planar_detail/-0755rm
property_maps/-0755rm
accounting.hpp8760644editdlrm
adjacency_iterator.hpp28990644editdlrm
adjacency_list.hpp136920644editdlrm
adjacency_list_io.hpp118490644editdlrm
adjacency_matrix.hpp457430644editdlrm
adj_list_serialize.hpp45230644editdlrm
astar_search.hpp267360644editdlrm
bandwidth.hpp29920644editdlrm
bc_clustering.hpp59370644editdlrm
bellman_ford_shortest_paths.hpp82290644editdlrm
betweenness_centrality.hpp262900644editdlrm
biconnected_components.hpp167010644editdlrm
bipartite.hpp134920644editdlrm
boyer_myrvold_planar_test.hpp98490644editdlrm
boykov_kolmogorov_max_flow.hpp473420644editdlrm
breadth_first_search.hpp147510644editdlrm
bron_kerbosch_all_cliques.hpp117360644editdlrm
buffer_concepts.hpp24290644editdlrm
chrobak_payne_drawing.hpp86410644editdlrm
circle_layout.hpp19240644editdlrm
closeness_centrality.hpp60570644editdlrm
clustering_coefficient.hpp57260644editdlrm
compressed_sparse_row_graph.hpp698870644editdlrm
connected_components.hpp41340644editdlrm
copy.hpp212250644editdlrm
core_numbers.hpp136630644editdlrm
create_condensation_graph.hpp31590644editdlrm
cuthill_mckee_ordering.hpp59920644editdlrm
cycle_canceling.hpp66450644editdlrm
dag_shortest_paths.hpp60640644editdlrm
degree_centrality.hpp42360644editdlrm
depth_first_search.hpp154300644editdlrm
dijkstra_shortest_paths.hpp236870644editdlrm
dijkstra_shortest_paths_no_color_map.hpp96200644editdlrm
dimacs.hpp104480644editdlrm
directed_graph.hpp242140644editdlrm
dll_import_export.hpp8920644editdlrm
dominator_tree.hpp175530644editdlrm
eccentricity.hpp46110644editdlrm
edge_coloring.hpp68090644editdlrm
edge_connectivity.hpp67960644editdlrm
edge_list.hpp99480644editdlrm
edmonds_karp_max_flow.hpp101770644editdlrm
edmunds_karp_max_flow.hpp9820644editdlrm
erdos_renyi_generator.hpp72570644editdlrm
exception.hpp14660644editdlrm
exterior_property.hpp42890644editdlrm
filtered_graph.hpp200980644editdlrm
find_flow_cost.hpp18590644editdlrm
floyd_warshall_shortest.hpp85100644editdlrm
fruchterman_reingold.hpp173250644editdlrm
geodesic_distance.hpp80150644editdlrm
graphml.hpp134600644editdlrm
graphviz.hpp335030644editdlrm
graph_archetypes.hpp110080644editdlrm
graph_as_tree.hpp45320644editdlrm
graph_concepts.hpp197850644editdlrm
graph_mutability_traits.hpp49950644editdlrm
graph_selectors.hpp12740644editdlrm
graph_stats.hpp43940644editdlrm
graph_traits.hpp130650644editdlrm
graph_utility.hpp161820644editdlrm
grid_graph.hpp338300644editdlrm
gursoy_atun_layout.hpp132480644editdlrm
hawick_circuits.hpp145930644editdlrm
howard_cycle_ratio.hpp231070644editdlrm
incremental_components.hpp82240644editdlrm
isomorphism.hpp263080644editdlrm
is_kuratowski_subgraph.hpp102600644editdlrm
is_straight_line_drawing.hpp72300644editdlrm
iteration_macros.hpp116590644editdlrm
iteration_macros_undef.hpp6730644editdlrm
johnson_all_pairs_shortest.hpp76460644editdlrm
kamada_kawai_spring_layout.hpp280480644editdlrm
king_ordering.hpp121010644editdlrm
kruskal_min_spanning_tree.hpp57430644editdlrm
labeled_graph.hpp309140644editdlrm
leda_graph.hpp287890644editdlrm
lookup_edge.hpp18940644editdlrm
loop_erased_random_walk.hpp44360644editdlrm
make_biconnected_planar.hpp35130644editdlrm
make_connected.hpp26450644editdlrm
make_maximal_planar.hpp75780644editdlrm
matrix_as_graph.hpp72270644editdlrm
maximum_adjacency_search.hpp151250644editdlrm
maximum_weighted_matching.hpp497220644editdlrm
max_cardinality_matching.hpp310000644editdlrm
mcgregor_common_subgraphs.hpp434700644editdlrm
mesh_graph_generator.hpp56160644editdlrm
metis.hpp109820644editdlrm
metric_tsp_approx.hpp108090644editdlrm
minimum_degree_ordering.hpp270870644editdlrm
named_function_params.hpp396390644editdlrm
named_graph.hpp206140644editdlrm
neighbor_bfs.hpp117630644editdlrm
numeric_values.hpp18140644editdlrm
one_bit_color_map.hpp32770644editdlrm
overloading.hpp15840644editdlrm
page_rank.hpp61640644editdlrm
planar_canonical_ordering.hpp72030644editdlrm
planar_face_traversal.hpp60200644editdlrm
plod_generator.hpp77080644editdlrm
point_traits.hpp7820644editdlrm
prim_minimum_spanning_tree.hpp29600644editdlrm
profile.hpp13270644editdlrm
properties.hpp124170644editdlrm
property_iter_range.hpp43450644editdlrm
push_relabel_max_flow.hpp347370644editdlrm
random.hpp96720644editdlrm
random_layout.hpp9880644editdlrm
random_spanning_tree.hpp57750644editdlrm
read_dimacs.hpp120800644editdlrm
relax.hpp44000644editdlrm
reverse_graph.hpp224020644editdlrm
rmat_graph_generator.hpp192910644editdlrm
r_c_shortest_paths.hpp306730644editdlrm
sequential_vertex_coloring.hpp45620644editdlrm
simple_point.hpp6280644editdlrm
sloan_ordering.hpp155400644editdlrm
smallest_last_ordering.hpp54580644editdlrm
small_world_generator.hpp36700644editdlrm
ssca_graph_generator.hpp65640644editdlrm
stanford_graph.hpp201260644editdlrm
stoer_wagner_min_cut.hpp124150644editdlrm
strong_components.hpp130090644editdlrm
st_connected.hpp28520644editdlrm
subgraph.hpp399960644editdlrm
successive_shortest_path_nonnegative_weights.hpp104130644editdlrm
tiernan_all_cycles.hpp125470644editdlrm
topological_sort.hpp26110644editdlrm
topology.hpp203890644editdlrm
transitive_closure.hpp142600644editdlrm
transitive_reduction.hpp53260644editdlrm
transpose_graph.hpp11980644editdlrm
tree_traits.hpp13380644editdlrm
two_bit_color_map.hpp35100644editdlrm
two_graphs_common_spanning_trees.hpp349960644editdlrm
undirected_dfs.hpp106720644editdlrm
undirected_graph.hpp252760644editdlrm
use_mpi.hpp4370644editdlrm
vector_as_graph.hpp104740644editdlrm
vertex_and_edge_range.hpp55280644editdlrm
vf2_sub_graph_iso.hpp485850644editdlrm
visitors.hpp113180644editdlrm
wavefront.hpp39320644editdlrm
write_dimacs.hpp28890644editdlrm
Edit: /usr/include/boost/graph/biconnected_components.hpp (16701B)
// Copyright (c) Jeremy Siek 2001 // Copyright (c) Douglas Gregor 2004 // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // NOTE: this final is generated by libs/graph/doc/biconnected_components.w #ifndef BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP #define BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP #include #include #include // for std::min and std::max #include #include #include #include #include #include #include #include #include namespace boost { namespace detail { template < typename ComponentMap, typename DiscoverTimeMap, typename LowPointMap, typename PredecessorMap, typename OutputIterator, typename Stack, typename ArticulationVector, typename IndexMap, typename DFSVisitor > struct biconnected_components_visitor : public dfs_visitor<> { biconnected_components_visitor(ComponentMap comp, std::size_t& c, std::size_t& children_of_root, DiscoverTimeMap dtm, std::size_t& dfs_time, LowPointMap lowpt, PredecessorMap pred, OutputIterator out, Stack& S, ArticulationVector& is_articulation_point, IndexMap index_map, DFSVisitor vis) : comp(comp) , c(c) , children_of_root(children_of_root) , dtm(dtm) , dfs_time(dfs_time) , lowpt(lowpt) , pred(pred) , out(out) , S(S) , is_articulation_point(is_articulation_point) , index_map(index_map) , vis(vis) { } template < typename Vertex, typename Graph > void initialize_vertex(const Vertex& u, Graph& g) { put(pred, u, u); vis.initialize_vertex(u, g); } template < typename Vertex, typename Graph > void start_vertex(const Vertex& u, Graph& g) { children_of_root = 0; vis.start_vertex(u, g); } template < typename Vertex, typename Graph > void discover_vertex(const Vertex& u, Graph& g) { put(dtm, u, ++dfs_time); put(lowpt, u, get(dtm, u)); vis.discover_vertex(u, g); } template < typename Edge, typename Graph > void examine_edge(const Edge& e, Graph& g) { vis.examine_edge(e, g); } template < typename Edge, typename Graph > void tree_edge(const Edge& e, Graph& g) { typename boost::graph_traits< Graph >::vertex_descriptor src = source(e, g); typename boost::graph_traits< Graph >::vertex_descriptor tgt = target(e, g); S.push(e); put(pred, tgt, src); if (get(pred, src) == src) { ++children_of_root; } vis.tree_edge(e, g); } template < typename Edge, typename Graph > void back_edge(const Edge& e, Graph& g) { BOOST_USING_STD_MIN(); typename boost::graph_traits< Graph >::vertex_descriptor src = source(e, g); typename boost::graph_traits< Graph >::vertex_descriptor tgt = target(e, g); if (tgt != get(pred, src)) { S.push(e); put(lowpt, src, min BOOST_PREVENT_MACRO_SUBSTITUTION( get(lowpt, src), get(dtm, tgt))); } vis.back_edge(e, g); } template < typename Edge, typename Graph > void forward_or_cross_edge(const Edge& e, Graph& g) { vis.forward_or_cross_edge(e, g); } template < typename Vertex, typename Graph > void finish_vertex(const Vertex& u, Graph& g) { BOOST_USING_STD_MIN(); Vertex parent = get(pred, u); if (parent == u) { // Root of tree is special is_articulation_point[get(index_map, u)] = (children_of_root > 1); } else { put(lowpt, parent, min BOOST_PREVENT_MACRO_SUBSTITUTION( get(lowpt, parent), get(lowpt, u))); if (get(lowpt, u) >= get(dtm, parent)) { is_articulation_point[get(index_map, parent)] = true; while (get(dtm, source(S.top(), g)) >= get(dtm, u)) { put(comp, S.top(), c); S.pop(); } BOOST_ASSERT(source(S.top(), g) == parent); BOOST_ASSERT(target(S.top(), g) == u); put(comp, S.top(), c); S.pop(); ++c; } } if (is_articulation_point[get(index_map, u)]) { *out++ = u; } vis.finish_vertex(u, g); } ComponentMap comp; std::size_t& c; std::size_t& children_of_root; DiscoverTimeMap dtm; std::size_t& dfs_time; LowPointMap lowpt; PredecessorMap pred; OutputIterator out; Stack& S; ArticulationVector& is_articulation_point; IndexMap index_map; DFSVisitor vis; }; template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, typename DiscoverTimeMap, typename LowPointMap, typename PredecessorMap, typename DFSVisitor > std::pair< std::size_t, OutputIterator > biconnected_components_impl( const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, LowPointMap lowpt, PredecessorMap pred, DFSVisitor dfs_vis) { typedef typename graph_traits< Graph >::vertex_descriptor vertex_t; typedef typename graph_traits< Graph >::edge_descriptor edge_t; BOOST_CONCEPT_ASSERT((VertexListGraphConcept< Graph >)); BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< Graph >)); BOOST_CONCEPT_ASSERT( (WritablePropertyMapConcept< ComponentMap, edge_t >)); BOOST_CONCEPT_ASSERT( (ReadWritePropertyMapConcept< DiscoverTimeMap, vertex_t >)); BOOST_CONCEPT_ASSERT( (ReadWritePropertyMapConcept< LowPointMap, vertex_t >)); BOOST_CONCEPT_ASSERT( (ReadWritePropertyMapConcept< PredecessorMap, vertex_t >)); std::size_t num_components = 0; std::size_t children_of_root; std::size_t dfs_time = 0; std::stack< edge_t > S; std::vector< char > is_articulation_point(num_vertices(g)); biconnected_components_visitor< ComponentMap, DiscoverTimeMap, LowPointMap, PredecessorMap, OutputIterator, std::stack< edge_t >, std::vector< char >, VertexIndexMap, DFSVisitor > vis(comp, num_components, children_of_root, dtm, dfs_time, lowpt, pred, out, S, is_articulation_point, index_map, dfs_vis); depth_first_search(g, visitor(vis).vertex_index_map(index_map)); return std::pair< std::size_t, OutputIterator >( num_components, vis.out); } template < typename PredecessorMap > struct bicomp_dispatch3 { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, typename DiscoverTimeMap, typename LowPointMap, class P, class T, class R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, LowPointMap lowpt, const bgl_named_params< P, T, R >& params, PredecessorMap pred) { return biconnected_components_impl(g, comp, out, index_map, dtm, lowpt, pred, choose_param(get_param(params, graph_visitor), make_dfs_visitor(null_visitor()))); } }; template <> struct bicomp_dispatch3< param_not_found > { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, typename DiscoverTimeMap, typename LowPointMap, class P, class T, class R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, LowPointMap lowpt, const bgl_named_params< P, T, R >& params, param_not_found) { typedef typename graph_traits< Graph >::vertex_descriptor vertex_t; std::vector< vertex_t > pred(num_vertices(g)); vertex_t vert = graph_traits< Graph >::null_vertex(); return biconnected_components_impl(g, comp, out, index_map, dtm, lowpt, make_iterator_property_map(pred.begin(), index_map, vert), choose_param(get_param(params, graph_visitor), make_dfs_visitor(null_visitor()))); } }; template < typename LowPointMap > struct bicomp_dispatch2 { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, typename DiscoverTimeMap, typename P, typename T, typename R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, const bgl_named_params< P, T, R >& params, LowPointMap lowpt) { typedef typename get_param_type< vertex_predecessor_t, bgl_named_params< P, T, R > >::type dispatch_type; return bicomp_dispatch3< dispatch_type >::apply(g, comp, out, index_map, dtm, lowpt, params, get_param(params, vertex_predecessor)); } }; template <> struct bicomp_dispatch2< param_not_found > { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, typename DiscoverTimeMap, typename P, typename T, typename R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, DiscoverTimeMap dtm, const bgl_named_params< P, T, R >& params, param_not_found) { typedef typename graph_traits< Graph >::vertices_size_type vertices_size_type; std::vector< vertices_size_type > lowpt(num_vertices(g)); vertices_size_type vst(0); typedef typename get_param_type< vertex_predecessor_t, bgl_named_params< P, T, R > >::type dispatch_type; return bicomp_dispatch3< dispatch_type >::apply(g, comp, out, index_map, dtm, make_iterator_property_map(lowpt.begin(), index_map, vst), params, get_param(params, vertex_predecessor)); } }; template < typename DiscoverTimeMap > struct bicomp_dispatch1 { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, class P, class T, class R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, const bgl_named_params< P, T, R >& params, DiscoverTimeMap dtm) { typedef typename get_param_type< vertex_lowpoint_t, bgl_named_params< P, T, R > >::type dispatch_type; return bicomp_dispatch2< dispatch_type >::apply(g, comp, out, index_map, dtm, params, get_param(params, vertex_lowpoint)); } }; template <> struct bicomp_dispatch1< param_not_found > { template < typename Graph, typename ComponentMap, typename OutputIterator, typename VertexIndexMap, class P, class T, class R > static std::pair< std::size_t, OutputIterator > apply(const Graph& g, ComponentMap comp, OutputIterator out, VertexIndexMap index_map, const bgl_named_params< P, T, R >& params, param_not_found) { typedef typename graph_traits< Graph >::vertices_size_type vertices_size_type; std::vector< vertices_size_type > discover_time(num_vertices(g)); vertices_size_type vst(0); typedef typename get_param_type< vertex_lowpoint_t, bgl_named_params< P, T, R > >::type dispatch_type; return bicomp_dispatch2< dispatch_type >::apply(g, comp, out, index_map, make_iterator_property_map( discover_time.begin(), index_map, vst), params, get_param(params, vertex_lowpoint)); } }; } template < typename Graph, typename ComponentMap, typename OutputIterator, typename DiscoverTimeMap, typename LowPointMap > std::pair< std::size_t, OutputIterator > biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out, DiscoverTimeMap dtm, LowPointMap lowpt) { typedef param_not_found dispatch_type; return detail::bicomp_dispatch3< dispatch_type >::apply(g, comp, out, get(vertex_index, g), dtm, lowpt, bgl_named_params< int, buffer_param_t >(0), param_not_found()); } template < typename Graph, typename ComponentMap, typename OutputIterator, typename P, typename T, typename R > std::pair< std::size_t, OutputIterator > biconnected_components(const Graph& g, ComponentMap comp, OutputIterator out, const bgl_named_params< P, T, R >& params) { typedef typename get_param_type< vertex_discover_time_t, bgl_named_params< P, T, R > >::type dispatch_type; return detail::bicomp_dispatch1< dispatch_type >::apply(g, comp, out, choose_const_pmap(get_param(params, vertex_index), g, vertex_index), params, get_param(params, vertex_discover_time)); } template < typename Graph, typename ComponentMap, typename OutputIterator > std::pair< std::size_t, OutputIterator > biconnected_components( const Graph& g, ComponentMap comp, OutputIterator out) { return biconnected_components( g, comp, out, bgl_named_params< int, buffer_param_t >(0)); } namespace graph_detail { struct dummy_output_iterator { typedef std::output_iterator_tag iterator_category; typedef void value_type; typedef void pointer; typedef void difference_type; struct reference { template < typename T > reference& operator=(const T&) { return *this; } }; reference operator*() const { return reference(); } dummy_output_iterator& operator++() { return *this; } dummy_output_iterator operator++(int) { return *this; } }; } // end namespace graph_detail template < typename Graph, typename ComponentMap, typename P, typename T, typename R > std::size_t biconnected_components(const Graph& g, ComponentMap comp, const bgl_named_params< P, T, R >& params) { return biconnected_components( g, comp, graph_detail::dummy_output_iterator(), params) .first; } template < typename Graph, typename ComponentMap > std::size_t biconnected_components(const Graph& g, ComponentMap comp) { return biconnected_components( g, comp, graph_detail::dummy_output_iterator()) .first; } template < typename Graph, typename OutputIterator, typename P, typename T, typename R > OutputIterator articulation_points(const Graph& g, OutputIterator out, const bgl_named_params< P, T, R >& params) { return biconnected_components(g, dummy_property_map(), out, params).second; } template < typename Graph, typename OutputIterator > OutputIterator articulation_points(const Graph& g, OutputIterator out) { return biconnected_components(g, dummy_property_map(), out, bgl_named_params< int, buffer_param_t >(0)) .second; } } // namespace boost #endif /* BOOST_GRAPH_BICONNECTED_COMPONENTS_HPP */