cgal/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Gc...

50 lines
1.7 KiB
TeX

\begin{ccRefFunctionObjectConcept}{AlgebraicStructureTraits::Gcd}
\ccDefinition
\ccc{AdaptableBinaryFunction} providing the gcd.
The greatest common divisor ($gcd$) of ring elements $x$ and $y$ is the unique
ring element $d$ (up to a unit) with the property that any common divisor of
$x$ and $y$ also divides $d$. (In other words: $d$ is the greatest lower bound
of $x$ and $y$ in the partial order of divisibility.) We demand the $gcd$ to be
unit-normal (i.e. have unit part 1).
$gcd(0,0)$ is defined as $0$, since $0$ is the greatest element with respect
to the partial order of divisibility. This is because an element $a \in R$ is said to divide $b \in R$, iff $\exists r \in R$ such that $a \cdot r = b$.
Thus, $0$ is divided by every element of the Ring, in particular by itself.
\ccRefines
\ccc{AdaptableBinaryFunction}
\ccTypes
\ccNestedType{result_type}
{ Is \ccc{AlgebraicStructureTraits::Type}.}
\ccGlue
\ccNestedType{first_argument}
{ Is \ccc{AlgebraicStructureTraits::Type}.}
\ccGlue
\ccNestedType{second_argument}
{ Is \ccc{AlgebraicStructureTraits::Type}.}
\ccOperations
\ccCreationVariable{gcd}
\ccThree{xxxxxxxxxxx}{xxxxxxxxxxx}{}
\ccMethod{result_type operator()(first_argument_type x,
second_argument_type y);}
{ returns $gcd(x,y)$. }
\ccMethod{template <class NT1, class NT2> result_type operator()(NT1 x, NT2 y);}
{This operator is defined if \ccc{NT1} and \ccc{NT2} are \ccc{ExplicitInteroperable}
with coercion type \ccc{AlgebraicStructureTraits::Type}. }
%\ccHasModels
\ccSeeAlso
\ccRefIdfierPage{AlgebraicStructureTraits}
\end{ccRefFunctionObjectConcept}