Subject: CGAL users discussion list
List archive
- From: "John Yamokoski" <>
- To:
- Subject: User defined point and distance classes for D-dimension searching
- Date: Thu, 31 May 2007 18:16:52 -0400
Greetings,
I am trying to write a flexible library for d-dimension nearest neighbor searching and I have found the manual quite helpful - particularly example 35.3.5. But what I would really desire is for my point class to be template based. So instead of fixed to 3, 4, or 5 dimensions it would be something like this:
template<unsigned size_t>I have only briefly thought about the changes that would be required to example 35.3.5 to accommodate this change. But I wanted to get some input from those more experienced with CGAL - is this a pretty reasonable change or is there something I am missing that would make this difficult.
struct Point {
double _vec[size_t];
Point()
Point(double* vec) { for (unsigned ii=0; ii < size_t; ++ii) _vec[ii] = vec[ii]; }
... [rest of class] ...
}; //end of class
J.D. Yamokoski
- User defined point and distance classes for D-dimension searching, John Yamokoski, 06/01/2007
Archive powered by MHonArc 2.6.16.