Boost logo

Boost Users :

From: Stephen torri (storri_at_[hidden])
Date: 2004-09-22 11:43:30


On Wed, 2004-09-22 at 01:43, Vladimir Prus wrote:
> Stephen torri wrote:
>
> > I see that the boost graph library is used to contain data but can it be
> > used to contain a class which a visitor moves along the graph per a
> > preset algorithm calling interfacing functions as it moves along?
>
> I can't understand the question, sorry. What's "moves along" and what's
> "present algorithm".

Sorry. This is a prime example of "Torri" logic. Half in the brain and
half in the email. A visitor to the graph would be what "moves" along on
the graph.

>
> > class Blue : Color_Base
> > {
> > virtual ~Blue (){}
> >
> > virtual std::string get_Name ()
> > { return std::string("Blue"); }
> > };
> >
> > So we could have a graph like
> >
> > |
> > Blue -- Red
> > | /
> > | /
> > | /
> > Yellow
> >
> > I have a visitor called Color_Visitor which has the following pseudo
> > code:
> >
> > for each vertice in graph
> > visit vertice
> > call get_Name()
> > print result
>
> You can assign a Color_Base* to each vertex using either internal or
> external property and call 'get_Name()' on each vertex.

Good idea. I will need to review what is a internal or external
property.

Thanks.

Stephen

-- 
Email: storri_at_[hidden]

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