Subject: CGAL users discussion list
List archive
- From: houes <>
- To:
- Subject: [cgal-discuss] Hash function for the Plane_3 class
- Date: Thu, 26 Apr 2018 19:36:26 -0700 (MST)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=SoftFail ; spf=Pass
- Ironport-phdr: 9a23:v6XuIBUNBA6E/mgnUemLXT+jOc/V8LGtZVwlr6E/grcLSJyIuqrYYxSDt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/ZisJ+kqFVrg+uqBNjzIDZe52VOfhicq/BYd8WWXRNU8BMXCJBGIO8aI4PAvIBPeZfsonyuUAOpga5CAmoBePvxT9IhmP23a09zuQuDxrG0RcvH9ILqnvUrdH1OL0OXuCyyanF1DPOZO5Y1zf67YjHaBEhofeUULJ2a8Xe0lIgFwfbgVmKtYPlODaV2+IQuGaY9+ptTf+jhm85pw1rvDSixskhhpPUio8bxF3I7yd0zJgzKNalUkB0e8SkH4FVtyyCN4t5XMciQ2ZwtSY8xbAKo5i7czIRx5s8wx7QdeaLfJSP4hLmTOqRIDF4i2x5eL+nmhq/8FasxvfiWsS03ltGtDdJn9fCu3wX1RHf9NCLSv5n8Ueg3TaP2RrT6uZBIU0skarbKpEhwr4slpoTtkTDAzH5mF7tga+Zc0Ur4Omo6+D9brr6oZ+cMpd4ihviPaQ2hsy/HeM4PxASUGiU4+u80KTv8lD4QLVRkvI2j7LZsIvBKMQApq+5BhdV3Zw55xa+CTemytUYkmMdIFJLYhLUx7TublrBKfS9AfakiEm3ix9qwerHN/vvGMbjNH/GxbfmYLtmoxpYyQUz0dBY+p9PIr4EKfP3HET2sYqLXVcCLwWozrO/W51G3YQEVDfXW/7LAObpqVaNo9kXDayJbY4Rtiz6LqF8tfHrhH4931QaePvyhMdFWDWDBv1jZn6hTz/0mN5YSDUFuwM/SKrhj1jQCWcONUb3ZLo143QAMKzjDYrHQdnw0rrdmiGyFJdSayZNDVXeSHo=
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.
Thank you, guys.
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
- [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.