[geos-devel] Comparing two QuadEdge objects

vishal tiwari hi.vishal123 at gmail.com
Fri Jul 12 23:27:25 PDT 2013


Hey strk,
I tried to compare them my pointers as:  qe != (QuadEdge*)&startQE, but
this condition is always true and goes into an infinite loop.


On 13 July 2013 11:43, Sandro Santilli <strk at keybit.net> wrote:

> On Fri, Jul 12, 2013 at 08:52:24PM +0530, vishal tiwari wrote:
> > This part of code in getVoronoiCellPolygon, :
> >
> > QuadEdge startQE = qe;
> >     do {
> > //      Coordinate cc = circumcentre(qe);
> >         // use previously computed circumcentre
> >         Coordinate cc = qe.rot().orig().getCoordinate();
> >       cellPts.add(cc);
> >
> >       // move to next triangle CW around vertex
> >       qe = qe.oPrev();
> >     } while (qe != startQE);
> >
> > The while condition is comparing two QuadEdge objects for not being
> equal.
> > So i need to override the != operator. How do it do it?
>
> I suspect that's a by-ref check, can you verify ?
> Linking between QuadEdges are by pointer, aren't them ?
>
> --strk;
> _______________________________________________
> geos-devel mailing list
> geos-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geos-devel
>



-- 
Vishal Tiwari
Undergraduate
Computer Science and Engineering
Lab for Spatial Informatics
IIIT-Hyderabad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20130713/7cfd61a5/attachment.html>


More information about the geos-devel mailing list