Subject: [boost] GGL - segments [was: Updating the Boost Review Process]
From: Barend Gehrels (barend_at_[hidden])
Date: 2009-11-19 11:46:43
> As an example, when I tested the segment intersection algorithm, I
> found that the bundled segment type holds its points by reference. So
> I couldn't have a vector of those points without modifying or rolling
> my own segment type. The call to check for intersections is named
> 'relate'. Though it really only calculates the intersection points.
> The name would seem to suggest it performs a more thorough topological
> characterization. Perhaps these come down to preference, but the
> feelings are there.
The relate has various policies, one of them is calculating intersection
points. Other are just checking how segments relate, but avoid the
calculation, because it is not necessary for all algorithms. This is the
reason to call it "relate"
The segment type provided by default is indeed holding references and it
does that on purpose. That avoids copying points all the time.
AFAIK the segment intersection algorithm does not use those references,
it refers to segments in the generic way, using get<0,0>(segment) etc.
It makes no difference if you're using a segment by reference or a
segment by value.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk