Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h
Chronological Thread
- From: Nicholas Mario Wardhana <>
- To:
- Subject: Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h
- Date: Fri, 2 Mar 2012 20:18:03 +0800
- Authentication-results: mr.google.com; spf=pass (google.com: domain of designates 10.152.122.74 as permitted sender) ; dkim=pass
On 2 March 2012 19:48, Nicholas Mario Wardhana
<>
wrote:
> On 2 March 2012 18:51, Sebastien Loriot (GeometryFactory)
> <>
> wrote:
>> Maybe another optimization problem.
>> Can you provide a minimal example showing the problem?
>>
>> Sebastien.
>>
>>
> Thank you very much for your quick reply, Dr. Loriot!
>
> As for the minimum example, let's see if I can do it, as the error
> seems to depend on the list of points. Previously, I tested with 1000
> collinear points along z axis (that is, (0, 0, 0) to (0, 0, 1000),
> with a distance of 1 for every pair of nearby points), and it was
> fine. I will try to generate a new list of points which is small
> enough to be hard-coded.
>
> For now, I can give the following snippet.
>
> // ---------------- Snippet starts here ----------------
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
> typedef CGAL::Point_3<Kernel> Point;
> typedef CGAL::Search_traits<double, CGAL3DPointNNS<NNSData>, const
> double*, ConstructCoordIterator<NNSData>> TreeTraits;
> typedef CGAL::Orthogonal_incremental_neighbor_search<TreeTraits,
> NNSDistance<NNSData>> NeighbourSearch;
> typedef typename NeighbourSearch::Tree Tree;
>
> // ...
>
> CGAL3DPointNNS<NNSData> query = CGAL3DPointNNS<NNSData>(rkInput.x,
> rkInput.y, rkInput.z, NNSData());
> Tree tree(m_pointList.begin(), m_pointList.end());
> NeighbourSearch search(tree, query);
> rSortedNeighbourList.clear();
> rDataList.clear();
> rSquaredDistanceList.clear();
>
> for(NeighbourSearch::iterator neighbourIterator = search.begin();
> neighbourIterator != search.end();
> neighbourIterator++)
> {
> // Assertion violation happens somewhere in this loop!
> Vec3 point(neighbourIterator->first.x(),
> neighbourIterator->first.y(), neighbourIterator->first.z());
> rSortedNeighbourList.push_back(point);
> rDataList.push_back(neighbourIterator->first.data);
> rSquaredDistanceList.push_back(neighbourIterator->second);
> }
>
> // ---------------- Snippet ends here ----------------
>
> Some explanations about the classes and variables:
> - CGAL3DPointNNS is based on the class Point in
>
> http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Spatial_searching/Chapter_main.html#Subsection_60.3.5
> ,
>
> - NNSData is a data class which I embed in every point in the space
> - Vec3 is our implementation of point in 3D space
> - m_pointList is the list of points
> - rkInput is the input point, whose closest point in m_pointList is to be
> found
> - rSortedNeighbourList is an output parameter to store the list of
> points, sorted by distance to rkInput
> - rDataList is the similarly sorted list of NNSData variables
> - rSquaredDistanceList is the similarly sorted list of squared
> distance of points in rSortedNeighbourList
>
> The error comes up when I iterate through the for loop. Unfortunately,
> as I mentioned in my previous e-mail, for some random points which I
> input manually, it didn't give any error when I debugged the code in
> Debug configuration.
>
> Thank you!
>
> Best regards,
> Nicholas
To be more exact, the problem arises when incrementing
neighbourIterator (neighbourIterator++).
Best regards,
Nicholas
- [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Sebastien Loriot (GeometryFactory), 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Sebastien Loriot (GeometryFactory), 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Sebastien Loriot (GeometryFactory), 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/07/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Sebastien Loriot (GeometryFactory), 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/06/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Nicholas Mario Wardhana, 03/02/2012
- Re: [cgal-discuss] "new_rd >= copy_rd" assertion violation in Orthogonal_incremental_neighbor_search.h, Sebastien Loriot (GeometryFactory), 03/02/2012
Archive powered by MHonArc 2.6.16.