Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-02-11 06:19:29


vladimir josef sykora wrote:
> Hello vladimir,
>
> "Vladimir Prus" <ghost_at_[hidden]> wrote in message
> news:b2aipc$6us$1_at_main.gmane.org...
>
>>Hi vladimir,
>>
>>>DF visit and undirected-DFV implementations (depth_first_visit_impl
>>>and undir_dfv_impl) functions receive ColorMaps by value, consequently
>
> the
>
>>>main trunk of the algorithm loose the graph coloring that these
>
> functions
>
>>>have performed.
>>>Am I missing something here?
>>
>>I think so. Property maps usually have shallow copy semantics. Copies
>>reference the same data.
>>
>
>
> The point is that I have my own internal properties for vertices and edges,
> and I had to construct new color maps to pass to the algorithms (providing
> get() and put()). Does this mean a that shallow copy is a requirement for
> the concept of property map?

The docs state that in quite vague terms and I don't remember where. I've
asked Jeremy about that and he agreed more documentation is needed, but I'm
not sure what those docs should say :-(

So, just make yours property map use shallow copy, or ask Jeremy for more
clarification :-)

- Volodya


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