Boost logo

Boost Users :

From: martin f krafft (madduck_at_[hidden])
Date: 2005-06-14 14:49:06


also sprach Doug Gregor <dgregor_at_[hidden]> [2005.06.14.2046 +0200]:
> The quick tour describes the descriptors:
>
> http://www.boost.org/libs/graph/doc/quick_tour.html

Their concept, yeah. Not necessarily how to extend them or use them
in advanced cases.

> > or the get_property method...
>
> The use of property maps is described here:
>
> http://www.boost.org/libs/graph/doc/using_property_maps.html

It does not explain to me what get_property does when called on an
edge descriptor. If get_property is not to be used by me, then
I wonder why it's not protected.

> The BGL isn't (and isn't intended to be) an object-oriented
> library. It's a generic library, and while OOP and generic
> programming share some common notions of abstract data types and
> polymorphism, they are different programming paradigms with
> different design strategies.

Yes, they are. And I am only starting to learn to separate them, so
thanks for your patience.

> Your post on c.l.c++.m actually reminded me of the other reason
> that properties can't be embedded into the vertex and edge
> descriptors: circular references. In the BGL adjacency_list,
> vertex descriptors can't have property type information in them,
> because the property type might rely on the type of the vertex
> descriptor.

Yes, this is essentially my problem.

> So, here's how I see it. You can definitely write your own
> (non-generic) graph type however it makes the most sense for your
> application. Then if you want to use BGL algorithms, you can write
> the interface code a la the LEDA adaptors. If you try to make that
> graph type too generic, you're going to run into the circular
> reference problem again. Or, you could use the BGL's graph types,
> which may not fit as cleanly in your application but are already
> implemented and play nicely with the rest of the BGL.

I truly appreciate your feedback and will let it settle for a while.
I'll (probably) be back.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net_at_madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus_at_[hidden]
 
do micro$oft's total cost of operation calculations
include total cost of downtime?



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