Dear Group,
trying for several days, I simply don't get the correct usage of
internal property maps and the connected_components algorithm. My graphs
are very large (about 600 000 vertices), so that I am using internal
instead of external property maps.
Looking at one of Jeremy's postings
(http://lists.boost.org/MailArchives/boost/msg15114.php) I defined my
graph as follows:
namespace boost {
enum vertex_component_t {vertex_component = 113 };
BOOST_INSTALL_PROPERTY(vertex, component);
}
typedef typename boost::adjacency_list<
boost::listS, //edges
boost::listS, //nodes
boost::undirectedS,
//vertex properties
boost::property
> >
// no edge properties
> Graph;
The code that uses internal property maps as an argument to
compute_components comes below (actually, I am not sure whether this is
a connected_components problem at all).
typedef boost::property_map::type
ComponentPropertyMap;
ComponentPropertyMap component = boost::get(boost::vertex_component,g);
int components_num = boost::connected_components(g,component);
This looks quite straightforward and is in line with what Jeremy has
posted. But I get the following compiler errors (using Boost 1.29 and
gcc 3.2):
[snip]
/project/algorithmics/include/boost/property_map.hpp:344: no match for
`const
__gnu_cxx::__normal_iteratorboost::default_color_type > >& + const
boost::detail::error_property_not_found&' operator
What is going wrong? Do I have to use a color_type_t (Why? How?)?
Any help is very welcome...
Many thanks in advance
Martin
--
-----------------------------------------------------------------------------
Martin Okrslar
MPI for Molecular Genetics phone: ++ 49 + 30 / 8413-1166
Computational Molecular Biology Fax: ++ 49 + 30 / 8413-1152
Ihnestrasse 73 email: okrslar@molgen.mpg.de
D-14195 Berlin URL: http://cmb.molgen.mpg.de
-----------------------------------------------------------------------------