Boost logo

Boost :

From: lucatoldo (luca.toldo_at_[hidden])
Date: 2002-01-23 09:29:17


Dear All,
I am a newbie of the boost system as well as of C++ and therefore
please tolerate by question.

I have an large tree (35798 nodes, 63947 edges) of which I would like
compute the minimum distance between few hundreds of pairs of nodes.
While in the current implementation the edges are all of length "1",
in a "next step" I would like to also add some weights.

I have installed the boost system (and purchased the book) yesterday
on a Linux without any problem. I am now familiar with the jam
building system and works fine.

I then converted my graph into a file like the following:

n 35798
e 19 1
e 20 19
e 21 20
...

and have tried to modify bfs.c in order to read it in but failed.

I then converted the graph into a series of
boost::add_edge(19,1,G)
boost::add_edge(20,19,G)
boost::add_edge(21,20,G)

then modified the bfs.cpp code appropriately (it is now and compiled
it, without any problem.

The example/bfs.cpp compiled without problems also in the distributed
version, and delivered result which was ok.

On the hardware I am using for these experiments
(
300 MHz Pentium PII, 130 MB RAM, Linux Kernel 2.2.18
900 MHz 4 processor Pentium PIII, 1 GB RAM, Linux Kernel 2.4.3
)
it takes considerable amount of time to compile but then is
incredibly fast in delivering the result.

Unfortunatley, however, I am getting some strange results with my
data. Namely, the first part of the output is allright
19 --> 1
20 --> 19
21 --> 20
...
35797 --> 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 35791

however the second one (I guess it is G_copy) it only contains the
start nodes
0 -->
1 -->

Furthermore the distances are all set to 0 (zero)

And the parent[0] are as well set to 0 (zero)

Any advice is welcome.

Again, please accept my apologyze for the verbosity and the dumbness.
Really a novice in C++ and boost.


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