libkdtree experiences and questions
Sylvain Bougerel
sylvain.bougerel.devel at gmail.com
Tue Nov 11 09:12:15 UTC 2008
Some mistake in my previous post:
> >
> >
> Wao. It looks really complicated. Did this library really forced you
> to do that? Shame on me...
It should be:
Shame on us...
Since I was not the one who wrote the library and I am not the only
one to maintain it.
> struct not_in_pred
> {
> bool operator (const tree_type::value_type& my_const_ref)
> {
> return !std::find(ptrs.begin(), ptrs.end(), &my_const_ref);
> }
>
> std::vector<tree_type::value_type*> ptrs; // vector are faster for small sets
> };
>
Should be:
struct not_in_pred
{
bool operator (const tree_type::value_type& my_const_ref)
{
return std::find(ptrs.begin(), ptrs.end(), &my_const_ref) == ptrs.end();
}
std::vector<tree_type::value_type*> ptrs; // vector are faster for small sets
};
I'm sure there are other errors...
More information about the libkdtree-devel
mailing list