New issue 3 by spoon.re...@gmail.com: Binary search wrong
http://code.google.com/p/geneticalgorithmtemplates/issues/detail?id=3
In MGalgo.h
(https://code.google.com/p/geneticalgorithmtemplates/source/browse/trunk/MGalgo.h),
the documentation for binary_search() in the comments clearly says that
when "target < list[start]", then it returns "start-1". However, if you
call binary_search(target, li) on any sorted list and any target less than
the start of the list (which subsequently calls binary_search_norecurse()
with start=0 and end=li.size()-1), it will never return start-1 (which is
-1), always returning 0.
Comment #1 on issue 3 by craig.ni...@gmail.com: Binary search wrong
http://code.google.com/p/geneticalgorithmtemplates/issues/detail?id=3
I'll look into it. Thanks for the report.
Comment #2 on issue 3 by craig.ni...@gmail.com: Binary search wrong
http://code.google.com/p/geneticalgorithmtemplates/issues/detail?id=3
(No comment was entered for this change.)
Comment #3 on issue 3 by craig.ni...@gmail.com: Binary search wrong
http://code.google.com/p/geneticalgorithmtemplates/issues/detail?id=3
This issue was closed by revision r21.