CGAL Made More Accessible

02/28/2022
by   Nir Goren, et al.
0

We introduce bindings that enable the convenient, efficient, and reliable use of software modules of CGAL (Computational Geometry Algorithm Library), which are written in C++, from within code written in Python. There are different tools that facilitate the creation of such bindings. We present a short study that compares three main tools, which leads to the tool of choice. The implementation of algorithms and data structures in computational geometry presents tremendous difficulties, such as obtaining robust software despite the use of (inexact) floating point arithmetic, found in standard hardware, and meticulous handling of all degenerate cases, which typically are in abundance. The code of CGAL extensively uses function and class templates in order to handle these difficulties, which implies that the programmer has to make many choices that are resolved during compile time (of the C++ modules). While bindings take effect at run time (of the Python code), the type of the C++ objects that are bound must be known when the bindings are generated, that is, when they are compiled. The types of the bound objects are instances (instantiated types) of C++ function and class templates. The number of object types that can potentially be bound, in implementation of generic computational-geometry algorithms, is enormous; thus, the generation of the bindings for all these types in advance is practically impossible. Often there are several choices to make, resulting in a prohibitively large number of combinations. We present a system that rapidly generates bindings for desired object types according to user prescriptions, which enables the convenient use of any subset of bound object types concurrently. The introduction of the bindings made them easily accessible to newcomers and practitioners in non-computing fields, as we report in the paper.

READ FULL TEXT

page 7

page 9

page 11

page 12

page 15

page 23

page 26

page 27

research
07/09/2020

ACORNS: An Easy-To-Use Code Generator for Gradients and Hessians

The computation of first and second-order derivatives is a staple in man...
research
08/08/2020

FitsGeo – Python package for PHITS geometry development and visualization

An easy way to define and visualize geometry for PHITS input files intro...
research
02/19/2018

Multithreading for the expression-dag-based number type Real_algebraic

Many algorithms, especially in the field of computational geometry, are ...
research
12/20/2020

Universal Numbers Library: design and implementation of a high-performance reproducible number systems library

With the proliferation of embedded systems requiring intelligent behavio...
research
11/08/2022

Summation Problem Revisited – More Robust Computation

Numerical data processing is a key task across different fields of compu...
research
09/15/2023

MetaOCaml Theory and Implementation

Quasi-quotation (or, code templates) has long been used as a convenient ...

Please sign up or login with your details

Forgot password? Click here to reset