mirror of https://github.com/CGAL/cgal
Fix
This commit is contained in:
parent
098e05e134
commit
b3cb80760c
|
|
@ -514,11 +514,6 @@ inline void FrechetLight<C>::continueQSimpleSearch(QSimpleInterval& qsimple,
|
||||||
// TODO: uncritical for correctness or speed but unelegant coding style: stripping down information added by getInterval
|
// TODO: uncritical for correctness or speed but unelegant coding style: stripping down information added by getInterval
|
||||||
CInterval temp_interval = FrechetLight::getInterval<IndexType>(
|
CInterval temp_interval = FrechetLight::getInterval<IndexType>(
|
||||||
fixed_curve, fixed, curve, cur);
|
fixed_curve, fixed, curve, cur);
|
||||||
std::cout .precision(15);
|
|
||||||
std::cout << "cur = " << cur << std::endl;
|
|
||||||
std::cout << temp_interval.begin.getPoint() << " "
|
|
||||||
<< temp_interval.begin.getFraction().approx << std::endl;
|
|
||||||
std::cout << temp_interval.end.getPoint() << std::endl;
|
|
||||||
|
|
||||||
Interval interval = Interval(temp_interval.begin.getPoint() == cur
|
Interval interval = Interval(temp_interval.begin.getPoint() == cur
|
||||||
? temp_interval.begin.getFraction()
|
? temp_interval.begin.getFraction()
|
||||||
|
|
@ -526,12 +521,9 @@ inline void FrechetLight<C>::continueQSimpleSearch(QSimpleInterval& qsimple,
|
||||||
temp_interval.end.getPoint() == cur
|
temp_interval.end.getPoint() == cur
|
||||||
? temp_interval.end.getFraction()
|
? temp_interval.end.getFraction()
|
||||||
: 1);
|
: 1);
|
||||||
std::cout << "before is_zero(): " << interval.begin.approx << std::endl;
|
|
||||||
// ssert(!certainly(temp_interval.begin.getFraction() <= 1)
|
|
||||||
// || !certainly(temp_interval.begin.getFraction() > 1));
|
|
||||||
// do previous check for fullness again, but now it is an exact decision
|
// do previous check for fullness again, but now it is an exact decision
|
||||||
if (is_zero(interval.begin) && is_one(interval.end)) { // Uncertain (A)
|
if (is_zero(interval.begin) && is_one(interval.end)) { // Uncertain (A)
|
||||||
std::cout << "after is_zero(): " << interval.begin.approx << std::endl;
|
|
||||||
assert(current_free);
|
assert(current_free);
|
||||||
++cur;
|
++cur;
|
||||||
stepsize *= 2;
|
stepsize *= 2;
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,10 @@ struct Lambda<Curve<FilteredTraits,true>>
|
||||||
// fill_lambda returns a pair and we are only interested in a bound
|
// fill_lambda returns a pair and we are only interested in a bound
|
||||||
bool update_exact() const
|
bool update_exact() const
|
||||||
{
|
{
|
||||||
if (is_exact) {
|
if (is_exact){
|
||||||
|
if (! exact){
|
||||||
|
exact = (is_one) ? std::make_optional(Exact(1)) : std::make_optional(Exact(0));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +201,9 @@ struct Lambda<Curve<FilteredTraits,true>>
|
||||||
{
|
{
|
||||||
if ((is_zero && other.is_zero) || (is_one && other.is_one))
|
if ((is_zero && other.is_zero) || (is_one && other.is_one))
|
||||||
return false;
|
return false;
|
||||||
if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one))
|
// AF this may be wrong if approx is [0.9,1.1] and other.is_one:
|
||||||
|
// if ((is_zero && (!other.is_zero)) || (!is_one && other.is_one))
|
||||||
|
if(is_zero && other.is_one)
|
||||||
return true;
|
return true;
|
||||||
CGAL::Uncertain<bool> res = approx < other.approx;
|
CGAL::Uncertain<bool> res = approx < other.approx;
|
||||||
if (CGAL::is_certain(res)) {
|
if (CGAL::is_certain(res)) {
|
||||||
|
|
@ -206,7 +211,8 @@ struct Lambda<Curve<FilteredTraits,true>>
|
||||||
}
|
}
|
||||||
update_exact();
|
update_exact();
|
||||||
other.update_exact();
|
other.update_exact();
|
||||||
return exact < other.exact;
|
bool eres = *exact < *other.exact;
|
||||||
|
return eres;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue