mirror of https://github.com/CGAL/cgal
minor changes according to 2.review of Sylvain Pion
This commit is contained in:
parent
f4bc456d8d
commit
6ac8c8bb0a
|
|
@ -6,10 +6,15 @@
|
||||||
|
|
||||||
\section{Introduction}
|
\section{Introduction}
|
||||||
|
|
||||||
Modular arithmetic is a fundamental tool in modern algebra systems. In conjunction with the Chinese remainder theorem it serves as the workhorse in several algorithms computing the gcd, resultant etc. Moreover, it can serve as a very efficient filter, since it is often possible to exclude that some value is zero by computing its modular correspondent with respect to one prime only.
|
Modular arithmetic is a fundamental tool in modern algebra systems.
|
||||||
|
In conjunction with the Chinese remainder theorem it serves as the
|
||||||
|
workhorse in several algorithms computing the gcd, resultant etc.
|
||||||
|
Moreover, it can serve as a very efficient filter, since it is often
|
||||||
|
possible to exclude that some value is zero by computing its modular
|
||||||
|
correspondent with respect to one prime only.
|
||||||
|
|
||||||
This package introduces a type \ccc{CGAL::Residue}, which can be considered as
|
First of all, this package introduces a type \ccc{CGAL::Residue}.
|
||||||
the workhorse of the package. It represents $\Z_{/p\Z}$ for some prime $p$.
|
It represents $\Z_{/p\Z}$ for some prime $p$.
|
||||||
The prime number $p$ is stored in a static member variable.
|
The prime number $p$ is stored in a static member variable.
|
||||||
The class provides static member functions to change this value.
|
The class provides static member functions to change this value.
|
||||||
{\bf Note that changing the prime invalidates already existing objects
|
{\bf Note that changing the prime invalidates already existing objects
|
||||||
|
|
@ -44,12 +49,11 @@ The class \ccc{CGAL::Modular_traits<T>} is designed such that the concept
|
||||||
\ccc{Modularizable} can be considered as optional, i.e.,
|
\ccc{Modularizable} can be considered as optional, i.e.,
|
||||||
\ccc{CGAL::Modular_traits<T>} provides a tag that can be used for dispatching.
|
\ccc{CGAL::Modular_traits<T>} provides a tag that can be used for dispatching.
|
||||||
|
|
||||||
\subsection{Examples}
|
\subsection{Example}
|
||||||
|
|
||||||
In the following example the modular arithmetic is used as a filter.
|
In the following example modular arithmetic is used as a filter.
|
||||||
\ccIncludeExampleCode{Modular_arithmetic/modular_filter.cpp}
|
\ccIncludeExampleCode{Modular_arithmetic/modular_filter.cpp}
|
||||||
|
|
||||||
|
|
||||||
\section{Design and Implementation History}
|
\section{Design and Implementation History}
|
||||||
|
|
||||||
The class \ccc{CGAL::Residue} is based on the C-code of Sylvain Pion et. al.
|
The class \ccc{CGAL::Residue} is based on the C-code of Sylvain Pion et. al.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue