Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?
Chronological Thread
- From: Matti Lehtonen <>
- To:
- Subject: Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?
- Date: Tue, 30 Apr 2013 17:31:45 +0300
Hi,
On 30 April 2013 14:58, Sebastien Loriot (GeometryFactory) <> wrote:
Without reference at "typedef value_type reference", but still with const keyword, a core dump is created, while building the tree.
Life is complex. It has real and imaginary parts. I think you should simply use:typedef value_type reference;
struct Property_map_xy_2
{
typedef Point_2 value_type;with
typedef const Multi_Classified_Point & key_type;
typedef boost::readable_property_map_tag category;
};
return Point_2( p.x(), p.y() );
Property_map_xy_2::reference
get
(
Property_map_xy_2,
Property_map_xy_2::key_type p
)
{
}
Without reference at "typedef value_type reference", but still with const keyword, a core dump is created, while building the tree.
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: b = (b && (bbox.min_coord(i) <= tbox.min_coord(i)))
File: /usr/include/CGAL/Point_container.h
Line: 325
otherwise, you might use tmp while it was changed.
I used a const reference, so changing should not be possible.
It seems that a tuple version works - inefficiently and with ugly code, but it works.
To the wish list:
* e.g. CGAL::Distance_xy_3 could be used similarly like CGAL::Triangulation_euclidean_traits_xy_3, which allows use of 3D points for 2D triangulation
Matti L
--
- [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Matti Lehtonen, 04/29/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Sebastien Loriot (GeometryFactory), 04/29/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Matti Lehtonen, 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Sebastien Loriot (GeometryFactory), 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Matti Lehtonen, 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Sebastien Loriot (GeometryFactory), 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Matti Lehtonen, 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Sebastien Loriot (GeometryFactory), 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Matti Lehtonen, 04/30/2013
- Re: [cgal-discuss] Suggestions for how to do 2D nearest neighbour search from 3D points?, Sebastien Loriot (GeometryFactory), 04/29/2013
Archive powered by MHonArc 2.6.18.