Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Duplicate points in Arrangment

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Duplicate points in Arrangment


Chronological Thread 
  • From: Juan Carlos Lopez Alfonso <>
  • To:
  • Subject: Re: [cgal-discuss] Duplicate points in Arrangment
  • Date: Sat, 4 Feb 2012 17:44:41 +0100

Hi,

Maybe some thing like this:

std::list<Point> L;
... insert in L several points ...

std::set<Point> unique_points;
std::copy(L.begin(),L.end(),std::inserter(unique_points,unique_points.begin()));

if (unique_points.size() != L.size())
{
std::cerr <<"Error duplicated points\n";
exit(EXIT_FAILURE);
}

Best Regards
JC

On Sat, Feb 4, 2012 at 5:38 PM, Winnie Hellmann
<>
wrote:
> Hi list!
>
> I would like to test if my algorithm outputs duplicate points into an
> arrangement. Is there any (linear time) possibility to check for
> duplicate points in an arrangement or even to prevent creating a second
> (isolated) vertex with same coordinates?
>
> Thanks in advance,
> Winnie Hellmann
>
> --
> PGP key: http://www.winniehell.de/0xA8FE4F09.pub.asc
>



Archive powered by MHonArc 2.6.16.

Top of Page