Bug Details
possible wrong coding in ValueSets.h
Posted by: Krzysztof
Posted at: 11/16/2008 5:39:42 AM
Fixed: Yes(12/1/2008 4:00:00 PM)
Closed: Yes(12/1/2008 4:00:00 PM)
Product Name: Genetic Algorithm Library
Product Version: 1.3 Open Source
Operationg System: Windows
Details:
There may be wrong coded function: virtual const T& GACALL ClosestValue(const T& value) const {...} in line 334. This line looks like this: T d = value > *it ? value > *it : *it - value; I suppose it should look like this: T d = value > *it ? value - *it : *it - value; Regards
Post comment (500 characters max):
Login Singup
 
Comments
Posted by Coolsoft at 12/1/2008 3:57:32 PM
Yes that line is incorrect (the actual line is 314) and the correct code should be as you suggested. Thanks for the feedback.