Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-11-05 12:09:54


On Mon, 5 Nov 2001, Vladimir Prus wrote:
ghost>
ghost> I've got several problems with BGL:
ghost> 1. 'isomorphism' has problems with directed graph. The following does not
ghost> compile:
ghost> [ includes skipped]
ghost> int main()
ghost> {
ghost> adjacency_list<vecS, vecS, directedS> g1, g2;
ghost> isomorphism(g1, g2);
ghost> }
ghost> When 'undirectedS' is used, it compiles. Is it my fault, or BGL's?

As per the docs, the second graph has to be a BidirectionalGraph, so
you need to use bidirectionS instead of directedS

ghost> 2. Semantics of num_vertices when applied to filtered_graph is non-intiutive,
ghost> but is not stated explicitly in docs. In truth, it should be better to fix,
ghost> yet I have no idea how this can be easily done --
ghost> vector<whatever> v(num_vertices(g)) is an idiomatic usage and changing
ghost> num_vertices semantics for filtered_graph will break it. The only way I see
ghost> to deal with it, it to deprecate vector usage, and create
ghost> resizable-on-subscript container specially for BGL.

Yes, I thought about this. I don't think the semantics can change, though
I will document them.

We certainly do need a resizable-on-subscript container. Would you
be interested in writing one?

ghost> 3. filtered_graph cannot be made from const graph, since ctor takes non-const
ghost> parameter. This requires making copy of the original graph. Is it the
ghost> recommended way, of just filtered_graph for const underlying graph is not
ghost> implemented?

This is a problem. I will fix it.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk