Boost logo

Boost :

Subject: Re: [boost] [Review] We're halfway through the GGL review
From: Barend Gehrels (barend_at_[hidden])
Date: 2009-11-15 12:53:37


Hi Fabio,

Thanks for your interest and for reviewing our library!

>
> polygon p1 = ...;
> polygon p2 = ...;
>
> polygon_set ps1 = make_union(p1, p2);
> polygon_set ps2;
> intersection(ps1, p2, ps2);
The polygon_set is implemented as a multi-polygon within GGL (and indeed
you can call it polygon_set, if it fulfils the concept). We didn't merge
the Multi* concepts into the generic algorithms, in other words, we
don't require anyone to use a multi* (of course algorithms can be used
for multi*).

Therefore, union and intersection work with output iterators. So:
union_inserter(p1, p2, std::back_inserter(ps1));

It is possible that there will be a "intersection" and "union_" as well,
detecting if ps1 is a multi-polygon and automatically inserting. But
that is more a sort of synonym, similar way to do things.

The make_union would require an r-value and if C++0x is there, it can be
implemented without copying the whole resultset. Indeed, it fits into
the design and naming conventions.

>
> On the whole I am very pleased with the documentation, its easy to
> read and reasonably complete.
> I have a general problem with doxygen generated docu with regard to
> generic libraries.[...]
I understand. Several people have addressed this so we will certainly
improve the documentation. Thanks for your structure proposal.

Regards, Barend


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