|
Boost Users : |
From: Jeffrey Holle (jeff.holle_at_[hidden])
Date: 2004-10-12 16:54:40
It seems that the subgraph.expected file contents is wrong.
The actual results are correct.
Be warned that the base graph's internal properties are not available in
a child subgraph. Such graphs have internal properties, but only
contain the data that their default constructor provides.
qyang_at_[hidden] wrote:
> Hi,
>
> I am new here. I recently downloaded the boost library from www.boost.org.
> I need to use the "subgraph" function in the library. I tried to run the
> example file "subgraph.cpp", but the running result was different from
> what was given in the file. Below is my running result and sample output:
>
> //my result:
>
> G0:
> 0 --> 1
> 1 --> 2 3
> 2 --> 5
> 3 -->
> 4 --> 1 5
> 5 --> 3
> 0(0,1) 1(1,2) 2(1,3) 6(2,5) 3(4,1) 4(4,5) 5(5,3)
>
> G1:
> 0 --> 2
> 1 --> 2
> 2 -->
> 6(0,2) 4(1,2)
>
> G2:
> 0 --> 1
> 1 -->
> 0(0,1)
>
> //sample output
>
> G0:
> 0 --> 1
> 1 --> 2 3
> 2 --> 5
> 3 -->
> 4 --> 1 5
> 5 --> 3
> 0(0,1) 1(1,2) 2(1,3) 6(2,5) 3(4,1) 4(4,5) 5(5,3)
>
> G1:
> 2 --> 5
> 4 --> 5
> 5 -->
> 6(2,5) 4(4,5)
>
> G2:
> 0 --> 1
> 1 -->
> 0(0,1)
>
> //======================================================
> Basically what happened was that the vertex indices of the subgraph G1 in
> my output are child's local indices, however, the vertex indices of the
> subgraph G1 in the sample output is parent's global indices. Can somebody
> explain this? Is it a bug in the boost code?
>
> Thanks very much,
> Qiaofeng
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net