problem with cctbx

Radostan Riedel raybuntu at googlemail.com
Sun Aug 5 18:05:36 UTC 2012


On Sun, 05. Aug 16:47, Frédéric-Emmanuel Picca wrote:
> this is the Debian version right ?
> 
> $ grep "const ANNbool" cctbx_sources/annlib/include/ANN/ANN.h
> const ANNboolANN_ALLOW_SELF_MATCH= ANNfalse;
> 
> this is the cctbx embeded copy, right ?
yes and yes.
> is it related to our problem ?
It's maybe related because they use 2 different kinds of ANN.
> this is not yet clear for me :)
> 
> cctbx generate two version in two different name space.
> one with ANNfalse in which namespace ?
> one with ANNtrue in the annself_include namespace.
> 
> then they use both version in the other part of their code.
> 
> then the normal namespace (annself ?) provided by Debian libann library is in fact the annself_include namespace of the cctbx libann variant ?
> 
> is it all ?
If you check "cctbx_sources/annlib_adaptbx/source_generators/generate_all.py
This is the py file that generates the source. It's good commented so you should
understand it. The main problem is that they assume ANN_ALLOW_SELF_MATCH to be
ANNfalse by default in libann source and the generate source which has
ANN_ALLOW_SELF_MATCH ANNtrue. In the annlib_ext py-extension we have 2 classes:
AnnAdaptor and AnnAdaptorSelfInclude.

So the expected result is that AnnAdaptor class is not matching "the point
itself" while searching the nearest neighbor because ANN_ALLOW_SELF_MATCH
is ANNfalse. Now the problem is that in ANN 1.1.2 (in Debian) this
value is ANNtrue so we'll have wrong results here.

We could now patch ann_adaptor.cpp and generate_all.py to switch the logic.
But this could get very confusing.




More information about the debian-science-maintainers mailing list