Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] CGAL : centroid and BigFLoat

Subject: CGAL users discussion list

List archive

[cgal-discuss] CGAL : centroid and BigFLoat


Chronological Thread 
  • From: Tom Dreyfus <>
  • To:
  • Subject: [cgal-discuss] CGAL : centroid and BigFLoat
  • Date: Fri, 8 Jun 2018 11:38:28 +0200

Hello,

I have some trouble using the CORE::BigFloat number type with the centroid function of CGAL, and I did not see any body with the same problems.

Here is a minimal example that does not compile for me :

#include <CGAL/CORE_BigFloat.h>
#include <CGAL/Cartesian.h>
#include <CGAL/centroid.h>
typedef CGAL::Cartesian<CORE::BigFloat> K;
int main(int argc, char *argv[]){
  std::vector<K::Point_3> points;
  K::Point_3 c = CGAL::centroid(points.begin(), points.end());
  return 0;}

I have the following error :


/usr/include/CGAL/centroid.h:425:23: error: call of overloaded ‘BigFloat(unsigned int&)’ is ambiguous
   return ORIGIN + v / (FT)nb_pts;
                       ^~~~~~~~~~

I can solve this by simply turning the unsigned nb_points into an int, but there is may be something I did not see, or the problem is solved in a more recent version of CGAL ?

My environment is :

Compiler : GNU 6.3.1, /usr/lib64/ccache/c++

OS : Fedora 25

CGAL : 4.9.1 installed with dnf

Thanks !

Tom.








Archive powered by MHonArc 2.6.18.

Top of Page