|
Boost : |
From: jsiek_at_[hidden]
Date: 2000-10-15 12:27:09
Hi Krishna,
Right, you will need to use a base class pointer, just as you would
when trying to store different types in an STL container (or any
container for that matter).
Cheers,
Jeremy
Krishna Padmasola writes:
> For example, if you model a LAN, then you have desktops, servers, hubs,
> routers, etc as various types of nodes in the network.
>
> I can currently think of two ways this can be done currently:
>
> 1- have a base node pointer as the vertex property, and derive all the
> different types of nodes from a common base class.
>
> 2- keep it externally, using the vertex descriptor as the key.
>
> Is there any other way?
>
> thanks,
> Krishna.
>
> jsiek_at_[hidden] wrote:
> >
> > I'm sorry, I don't understand your question. What do you mean by
> > "different types"? Different in what way?
> >
> > Cheers,
> >
> > Jeremy
> >
> > Krishna Padmasola writes:
> > > Hi Jeremy,
> > >
> > > How difficult is it to have different types of nodes/edges in one graph?
> > >
> > > Thanks in advance,
> > > Krishna.
> > >
> > >
> > >
> > >
>
>
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk