Boost logo

Boost Users :

From: hicks (hicks_at_[hidden])
Date: 2002-05-05 12:05:52


rzako23 wrote:

>Thank you to everyone for your interest and suggestions.
>
>Following are specific responses to recent postings.
>
>Rob Zako
>
>
>--- In Boost-Users_at_y... #684, Craig Hicks <hicks_at_k...> wrote:
>
>>Actually, such a functionality does exist in Boost.
>>That is because an arbitrary many-to-many mapping with per-node
>>and per-edge data can be represented by a graph which stores
>>per-node and per-edge data.
>>
>
>Yes, Craig, I have looked quite a bit at the Boost Graph Library.
>A lot of thought has gone into this library and it is very general.
>
>But I thought that a graph can represent only an association between
>a class and itself, not between two distinct classes. Am I missing
>something here?
>

A graph can represent associations between two nodes by means of the
edge (or edges) which
connect those two nodes. The nodes are, needless to say, distinct
objects. It's up to the programmer
to design a node data type which can capture the necessary information
to distinguish between
nodes. Obviously what I'm saying is obvious, so I think it's my turn to
say "I'm missing your point".
and ask for clarification.

Are you saying it would be useful to have a bipartite graph (or
N-partite graph) with each
part holding seperate types? Is that how Tevich's association library
worked? I can't recall.

I dare say the BGL (or any C++ based graph) could handle nodes with
different data types via
inheritance (all nodes contain a pointer to base data class).

Regardless, the issue of classes is one of syntax. My statement was
meant semantically,
without regard to syntax.

1.Do you agree with the statement "Any implementation of an many-many
assoication container
must have an underlying graph lurking within (semantically speaking)"?

2.Do you agree with the statement "The BGL is capable of being the
uderlying mechanism for
implementing a many-many class (e.g., one with the I/F defined by
Telvich's interface) ?

I'm fairly certain about 1, and think 2 is correct, but am not certain
especially since I don't have
Tevich's class at hand right now.

The 3rd question is, if it can be implemented with BGL, is it worth it?
You'd be able to reuse the exchangeability of data structures.
You'd have a host of algorithms available.
Anything new you developed might be reused for graphs in general.
You'd have more time to concentrate on the I/F.

Craig Hicks

>

[Non-text portions of this message have been removed]


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