Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

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


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] CGAL : centroid and BigFLoat
  • Date: Tue, 12 Jun 2018 13:02:37 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:aV5Pmh8yV5SBz/9uRHKM819IXTAuvvDOBiVQ1KB31u8cTK2v8tzYMVDF4r011RmVBdids6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+553ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRgL2hicJNzA382/ZhcJ/g61ZvB2vqAdyw5LXbYyPKPZyYq3QcNEcSGFcXshRTStBAoakYocBEuQOI/1XoJPmp1sSrBuxGw+sD/7pxD9PnH/23Ko60/g8Gg3C3QIvAdUOsHHKo9XpLqcTUeC7w7PUwjXfaPNWwzf85I3Gfhs8pvyMRrZwcc3LyUkuEAPFkk+cqYnhPz6O2eQNtnKU7+tkVe61l2EnrARxryGpy8wxhIfJgYcVxUrF9SV/2Is1Kty4SFJ7Yd65C5RcrT2VN4xzQs4kXmpmuz46x6UYtZKneCUG0pcqyh7FZ/CabYSF4QjvWPuSLDtmnH5oe66ziwys/US9yuDwTNe43EpIoyZfj9XBtHAA2hrO4cadUPR95F2u2TOX2gDT9O5EJUc0mLLeK5E7w74wkoMfsErZHiPqgUn2grKae0Y69uSy5OTnZbLmppCYN4BqkA3xLqMumsmnDeQ5NAgBQXSb9Pyi2LH/+UD1WrZHg/0snqXErpzXJt4XqrO6DgNLyooj7gywDzai0NQWh3kHK1dFdQqcj4jtPFHOOvH4DfCjg1i2lTdrw+vLPrLkAprXL3jDlK3tcqp6605Z0AYz18xQ54pICrEdJ/L+QlP+tNPCAR89KgC73ufnCM5h2YMDQmKPGbSUMLjSsF+N/uIgOfOAZI4TuDbnKvgq/eTijXEjmQxVQa781pQebDW0H+9tPl6CSXvqmNYIV2kQ7SQkS+m/wmaPWzdIe3e/WeoY4Ss6D57uTajOQYWgnKaQ8i6wAppMdyEMQgSXFXDydoKYHfIIQC2XK85l1DcDUO7yGMcayRiyuVqimPJcJe3O93hA7MOx5J1O/+TW0CoK23lxBsWZ3XuKSjgtzGwNTj4ymqt4pB4kkwvR4e1Dm/VdUOdrybZRSA5jbMzTyuV7D5b5XQeTJo7UGmbjec2vBHQKdvx0w9IKZBwjSdCrjxSGwDDyRrFMx+bNC5sz/abRmXP2IpQlxg==

BigFloat does not have a constructor from unsigned int so it makes the call in centroid ambiguous as you noted.

Should be fixed by https://github.com/CGAL/cgal/pull/3166

Sebastien.

On 06/08/2018 11:38 AM, Tom Dreyfus wrote:
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