Boost logo

Boost :

Subject: Re: [boost] [Boost Graph Library] Having trouble constructing necessary parameters for the isomorphism algorithm
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-01-17 16:39:41


On Mon, 17 Jan 2011, Alexander Bock wrote:

>
> No, it seems I have overlooked that sadly, even though I know they are
> not initialized automatically. I threw together a somewhat unelegant
> function to initialize the bundled properties:
>
> void BoostGraph::InitializeBundledProperties()
> {
> VertexIterator vertexIter;
> VertexIterator vertexIterEnd;
> int count = 0;
>
> for(tie(vertexIter, vertexIterEnd) = vertices(uGraph); vertexIter != vertexIterEnd; ++vertexIter)
> {
> uGraph[(*vertexIter)].index = count;
> ++count;
> }
> }
>
> Calling this after I have finished loading the graphs with
> BoostGraph::LoadVienna(...) seems to do the trick. The test files I
> created return the correct results (Isomorphic for identical graphs, not
> isomorphic for graphs with different layouts). The default max_invariant
> works too.

Will this work if the graphs have isomorphic vertices in a different
order? Why not just leave off the invariant maps altogether and let BGL
create them for you?

-- Jeremiah Willcock


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