Added CGAL_DEBUG macro

This commit is contained in:
Mael Rouxel-Labbé 2017-08-23 16:31:17 +02:00
parent f7405c8f96
commit 406f41af78
1 changed files with 36 additions and 33 deletions

View File

@ -1810,15 +1810,14 @@ Alpha_shape_3<Dt,EACT>::find_optimal_alpha(size_type nb_components) const
half = len / 2;
middle = first + half;
/* //#ifdef DEBUG */
/* std::cerr << "first : " << *first */
/* << " last : " */
/* << ((first+len != last) ? *(first+len) : *(last-1)) */
/* << " mid : " << *middle */
/* << " nb comps : " << number_of_solid_components(*middle) */
/* << std::endl; */
/* //#endif // DEBUG */
#ifdef CGAL_DEBUG_ALPHA_SHAPE_3
std::cerr << "first : " << *first
<< " last : "
<< ((first+len != last) ? *(first+len) : *(last-1))
<< " mid : " << *middle
<< " nb comps : " << number_of_solid_components(*middle)
<< std::endl;
#endif
if (number_of_solid_components(*middle) > nb_components)
{
first = middle + 1;
@ -1830,18 +1829,22 @@ Alpha_shape_3<Dt,EACT>::find_optimal_alpha(size_type nb_components) const
}
}
/* std::cerr << "a la fin " << std::endl */
/* << "first : " << *first */
/* << " nb comps : " << number_of_solid_components(*first) */
/* << std::endl; */
/* if ((first+1) < alpha_end()) */
/* std::cerr << "first+1 " << *(first+1) */
/* << " nb comps : " << number_of_solid_components(*(first+1)) */
/* << std::endl; */
/* std::cerr << std::endl; */
#ifdef CGAL_DEBUG_ALPHA_SHAPE_3
std::cerr << "In the end: " << std::endl
<< "first : " << *first
<< " nb comps : " << number_of_solid_components(*first)
<< std::endl;
if ((first+1) < alpha_end())
std::cerr << "first+1 " << *(first+1)
<< " nb comps : " << number_of_solid_components(*(first+1))
<< std::endl;
std::cerr << std::endl;
#endif
if (number_of_solid_components(*first) <= nb_components ) return first;
else return first+1;
if (number_of_solid_components(*first) <= nb_components )
return first;
else
return first+1;
}
//----------------------------------------------------------------------