Boost logo

Boost :

From: Petr Ovchenkov (ptr_at_[hidden])
Date: 2001-11-06 04:48:20

I have a couple questions related to BGL.

Basic container other then vector require some additional definitions,
isn't it?

The code

   typedef adjacency_list<vecS, vecS, undirectedS> Graph;

   Graph g;
   boost::add_edge( 1, 2, g );
   size_t nv = boost::num_vertices( g );

compile and work fine, but if I replace Graph definition by

   typedef adjacency_list<listS, listS, undirectedS> Graph;

compilation fail. (The first example work only for vecS). I need write

   boost::add_edge( vertex( 1, g ), vertex( 2, g ), g );

But I still not understand what type I should define for 2nd argument
of call

   size_t num = boost::connected_components( g, component );

Another question is: how I should define Graph, if I want to save
memory as much as possible, and vertex key and value are the same?

How I should define 2nd argument of connected_components()?

Thanks in advance,

   - Petr

Boost list run by bdawes at, gregod at, cpdaniel at, john at