\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.11.3 - Modular Arithmetic
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Modularizable Concept Reference

Definition

An algebraic structure is called Modularizable, if there is a suitable mapping into an algebraic structure which is based on the type CGAL::Residue. For scalar types, e.g. Integers, this mapping is just the canonical homomorphism into the type CGAL::Residue with respect to the current prime. For compound types, e.g. Polynomials, the mapping is applied to the coefficients of the compound type.

The mapping is provided via CGAL::Modular_traits<Modularizable>, being a model of ModularTraits.

Note that types representing rationals, or types which do have some notion of denominator, are not Modularizable. This is due to the fact that the denominator may be zero modulo the prime, which can not be represented.

Has Models:

int

long

CORE::BigInt

CGAL::Gmpz

leda_integer

mpz_class

CGAL::Sqrt_extension<NT,ROOT>

CGAL::Polynomial<Coeff>

The following types are Modularizable iff their template arguments are.

Has Models:
CGAL::Lazy_exact_nt<NT>
See Also
CGAL::Residue
CGAL::Modular_traits<T>