CGAL kernel

发布时间 2023-05-04 17:36:36作者: spierb

reference: 2D and 3D Linear Geometry Kernel User Manual

CGAL offers four families of concrete models for the concept Kernel, two based on the Cartesian representation of points and two based on the homogeneous representation of points.

a kernel class provides two typenames for number types, namely Kernel::FT and Kernel::RT. The type Kernel::FT must fulfill the requirements on what is called a FieldNumberType in CGAL. This roughly means that Kernel::FT is a type for which operations +, −, ∗ and / are defined with semantics (approximately) corresponding to those of a field in a mathematical sense. Note that, strictly speaking, the built-in type int does not fulfill the requirements on a field type, since ints correspond to elements of a ring rather than a field, especially operation / is not the inverse of ∗. The requirements on the type Kernel::RT are weaker. This type must fulfill the requirements on what is called a RingNumberType in CGAL. This roughly means that Kernel::RT is a type for which operations +, −, ∗ are defined with semantics (approximately) corresponding to those of a ring in a mathematical sense.


Cartesian Kernels & Homogeneous Kernels 的 RT / FT
... in Simple_cartesian both Simple_cartesian::FT and Simple_cartesian::RT are mapped to FieldNumberType. ...
... in Simple_homogeneous the type Simple_homogeneous::FT is equal to Quotient while Simple_homogeneous::RT is equal to RingNumberType. ...