[gecode-users] Trigonometric functions in Gecode
Jonathan Skovhus Andersen
jonathanskovhus at gmail.com
Thu Mar 17 10:34:35 CET 2011
Hello,
I'm a beginner in Gecode, so there is something that I don't quite
understand. First of all I understand that Gecode only uses integers. But in
my implementation I have to use arcus tangent which gives me some problems.
I have to following line in my code:
*for(int i = 0; i < p.size(); i++)*
* rel(*this, angle[i] ==
180/3.1415*atan((sqrt(sqr(coordinatesArray[i][0]-x)+sqr(coordinatesArray[i][1]-y))/constantsArray[2][0])));
*
Which gives me the following error:
*Error 12 error C2665: 'atan' : none of the 3 overloads could convert all
the argument types ...source.cpp 107 TSP*
Is there any way to work around this? I don't really have any ideas...
*Regards,*
*Jonathan Skovhus Andersen*
*Aalborg University*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20110317/474626c0/attachment.html>
More information about the users
mailing list