Subject: CGAL users discussion list
List archive
- From: Marc Glisse <>
- To:
- Subject: Re: [cgal-discuss] Hash function for the Plane_3 class
- Date: Fri, 27 Apr 2018 11:35:11 +0200 (CEST)
On Thu, 26 Apr 2018, houes wrote:
Hello. I have a bunch of Plane_3 objects in std::vector, However, there are
some duplicates among them. I need to eliminate the duplicates.
I thought of two methods:
(1) sort and unique using std. However this requires me to design a
comparator for Plane_3, anyone know what would be a good comparator for
Plane_3 like?
(2) add items into a hashset one by one. However, this requires me to design
a hash function for Plane_3, and I wonder what is a good hash function for
Plane_3.
Efficiency speaking, method (2) would be better, because it take O(n) time,
where n is the number of input Planes. Method (1) takes O(nlogn) due to
sorting.
Therefore, I would like to know what a good hashing function for Plane_3 is
like.
Numerical issues make this problematic.
Are you using Epick or Epeck?
Are your duplicates copies originating from the same object, or are they possibly created separately?
--
Marc Glisse
- [cgal-discuss] Hash function for the Plane_3 class, houes, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, Marc Glisse, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, houes, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, Marc Glisse, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, houes, 04/28/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, Marc Glisse, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, houes, 04/27/2018
- Re: [cgal-discuss] Hash function for the Plane_3 class, Marc Glisse, 04/27/2018
Archive powered by MHonArc 2.6.18.