From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/graph/test/bfs_cc.cpp | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/boost/libs/graph/test/bfs_cc.cpp (limited to 'src/boost/libs/graph/test/bfs_cc.cpp') diff --git a/src/boost/libs/graph/test/bfs_cc.cpp b/src/boost/libs/graph/test/bfs_cc.cpp new file mode 100644 index 00000000..465dec30 --- /dev/null +++ b/src/boost/libs/graph/test/bfs_cc.cpp @@ -0,0 +1,54 @@ +//======================================================================= +// Copyright 2002 Indiana University. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// 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) +//======================================================================= + +#include +#include +#include + +int main() +{ + using namespace boost; + typedef default_constructible_archetype< + sgi_assignable_archetype< + equality_comparable_archetype<> > > vertex_t; + { + typedef incidence_graph_archetype IncidenceGraph; + typedef vertex_list_graph_archetype graph_t; + graph_t& g = static_object::get(); + vertex_t s; + read_write_property_map_archetype color; + breadth_first_search(g, s, color_map(color)); + } + { + typedef incidence_graph_archetype IncidenceGraph; + typedef vertex_list_graph_archetype graph_t; + graph_t& g = static_object::get(); + vertex_t s; + readable_property_map_archetype v_index; + breadth_first_search(g, s, vertex_index_map(v_index)); + } + { + typedef incidence_graph_archetype IncidenceGraph; + typedef vertex_list_graph_archetype Graph; + typedef property_graph_archetype + graph_t; + graph_t& g = static_object::get(); + vertex_t s; + bfs_visitor<> v; + buffer_archetype b; + breadth_first_search(g, s, visitor(v).buffer(b)); + } + return 0; +} -- cgit v1.2.3