Geometric predicates are at the core of many algorithms, such as the construction of Delaunay triangulations, mesh processing and spatial relation tests. These algorithms have applications in scientific computing, geographic information systems and computer-aided design. With floating-point arithmetic, these geometric predicates can incur round-off errors that may lead to incorrect results and inconsistencies, causing computations to fail. This issue has been addressed using a combination of exact arithmetic for robustness and floating-point filters to mitigate the computational cost of exact computations. The implementation of exact computations and floating-point filters can be a difficult task, and code generation tools have been proposed to address this. We present a new C++ meta-programming framework for the generation of fast, robust predicates for arbitrary geometric predicates based on polynomial expressions. We combine and extend different approaches to filtering, branch reduction, and overflow avoidance that have previously been proposed. We show examples of how this approach produces correct results for data sets that could lead to incorrect predicate results with naive implementations. Our benchmark results demonstrate that our implementation surpasses state-of-the-art implementations.
翻译:几何上游是许多算法的核心,例如建造Delaunay三角对流器、网格处理和空间关系测试。这些算法在科学计算、地理信息系统和计算机辅助设计方面都有应用。随着浮点算术,这些几何上游可能会产生圆形错误,可能导致不正确的结果和不一致,导致计算失败。这个问题已经通过精密的精确算术和浮点过滤器的结合来解决,以降低精确计算的成本。精确计算和浮点过滤器的实施可能是一项困难的任务,为此提出了代码生成工具。我们提出了一个新的C++元元方案框架,用于生成基于多元表示法的任意几何假设的快速、稳健的上游。我们综合并推广了以前提出的过滤、分数减少和避免溢出的不同方法。我们举例说明了这一方法如何为数据集产生正确的结果,从而导致不正确的上游结果,从而实现天真的执行。我们的基准结果表明,我们的执行超过了目前的执行情况。