Made the Base type public and fixed the Approximate_2 operator that operates on x-monotone curves

This commit is contained in:
Efi Fogel 2024-12-30 00:57:16 +02:00
parent 604bac4dad
commit df1179889c
1 changed files with 11 additions and 4 deletions

View File

@ -76,9 +76,9 @@ public:
NUMBER_OF_OPERATIONS
};
private:
using Base = BaseTraits;
private:
//! A set of bits that indicate whether operations should be traced.
unsigned long long m_flags;
@ -832,9 +832,16 @@ public:
std::cout << "approximate_2" << std::endl
<< " xcv: " << xcv << ", error: " << error
<< ", l2r: " << l2r << std::endl;
auto res = m_object(xcv, error, oi, l2r);
std::cout << " result: " << res << std::endl;
return res;
std::list<Approximate_point_2> container;
m_object(xcv, error, std::back_inserter(container), l2r);
if (container.empty()) return oi;
std::size_t i = 0;
for (const auto& point : container) {
std::cout << " result[" << i++ << "]: " << point << std::endl;
*oi++ = point;
}
return oi;
}
};