A bug for the Octagonal_Shape class
Hi all, I have discovered a bug in the "striclty_contains" method for the Octagonal_Shape class. The following piece of code
Octagonal_Shape<double> o1(3,UNIVERSE); Octagonal_Shape<double> o2(3,EMPTY); bool result = o1.strictly_contains(o2);
ends with result==false instead of result==true. Note that method "contains" works.
The bug is both in the released versions and in the git.
--gianluca
On 05/23/2012 10:16 AM, Gianluca Amato wrote:
Hi all, I have discovered a bug in the "striclty_contains" method for the Octagonal_Shape class. The following piece of code
Octagonal_Shape<double> o1(3,UNIVERSE); Octagonal_Shape<double> o2(3,EMPTY); bool result = o1.strictly_contains(o2);
ends with result==false instead of result==true.
Confirmed. Thanks for reporting!
Note that method "contains" works.
Actually, the bug is in "contains", which is giving the wrong result when the first argument is empty and the second is not empty. "strictly_contains" is implemented in terms of "contains".
The very same bug is in BD_Shape<T>::contains().
The fix will be soon available in git.
Ciao, Enea.
The bug is both in the released versions and in the git.
--gianluca _______________________________________________ PPL-devel mailing list PPL-devel@cs.unipr.it http://www.cs.unipr.it/mailman/listinfo/ppl-devel
participants (2)
-
Enea Zaffanella -
Gianluca Amato