mirror of https://github.com/CGAL/cgal
rename IntegralSqrt to IsSquare
This commit is contained in:
parent
a1746992c8
commit
47b51dd6cf
|
|
@ -4,8 +4,8 @@ Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits
|
|||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_DivMod.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Gcd.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_IntegralDivision.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_IntegralSqrt.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_IsOne.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_IsSquare.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_IsZero.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_KthRoot.tex -text
|
||||
Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Mod.tex -text
|
||||
|
|
|
|||
|
|
@ -84,22 +84,19 @@ In case \ccc{Algebraic_structure} is a model of \ccc{IntegralDomainWithoutDivisi
|
|||
this is not \ccc{CGAL::Null_functor}.
|
||||
}
|
||||
|
||||
|
||||
|
||||
\ccNestedType{Integral_division}{
|
||||
This is either \ccc{CGAL::Null_functor} or a model of
|
||||
\ccc{AlgebraicStructureTraits::IntegralDivision}.\\
|
||||
In case \ccc{Algebraic_structure} is a model of \ccc{IntegralDomain}
|
||||
this is not \ccc{CGAL::Null_functor}.
|
||||
}
|
||||
\begin{ccAdvanced}
|
||||
\ccNestedType{Integral_sqrt}{
|
||||
|
||||
\ccNestedType{Is_square}{
|
||||
This is either \ccc{CGAL::Null_functor} or a model of
|
||||
\ccc{AlgebraicStructureTraits::IntegralSqrt}.\\
|
||||
\ccc{AlgebraicStructureTraits::IsSquare}.\\
|
||||
In case \ccc{Algebraic_structure} is a model of \ccc{IntegralDomain}
|
||||
this is not \ccc{CGAL::Null_functor}.
|
||||
}
|
||||
\end{ccAdvanced}
|
||||
|
||||
\ccNestedType{Gcd}{
|
||||
This is either \ccc{CGAL::Null_functor} or a model of
|
||||
|
|
|
|||
|
|
@ -2,14 +2,15 @@
|
|||
|
||||
\begin{ccRefConcept}{AlgebraicStructureTraits::IsSquare}
|
||||
|
||||
\begin{ccAdvanced}
|
||||
\ccDefinition
|
||||
|
||||
\ccc{AdaptableBinaryFunction} providing an integral square root.
|
||||
|
||||
An ring element $x$ is said to be a square if there exists a ring element $y$ such
|
||||
that $x= y*y$. Since the ring represented is an integral domain,
|
||||
$y$ is uniquely defined up to multiplication by units.
|
||||
An ring element $x$ is said to be a square iff there exists a ring element $y$ such
|
||||
that $x= y*y$. In case the ring is a \ccc{UniqueFactorizationDomain},
|
||||
$y$ is uniquely defined up to multiplication by units. \\
|
||||
|
||||
%Note that this is an optional functor and not required by any algebraic structure concept.
|
||||
|
||||
\ccRefines
|
||||
|
||||
|
|
@ -27,8 +28,8 @@ $y$ is uniquely defined up to multiplication by units.
|
|||
\ccSetThreeColumns{xxxxxxxxxx}{xxxxx}{}
|
||||
\ccMethod{result_type operator()(first_argument_type x,
|
||||
second_argument_type y);}
|
||||
{ returns {\tt true} in case $x$ is a perfect square, i.e. $x = y*y$.
|
||||
\ccPostcond $unit\_part(y) == 1$. ( $y$ is unit normal.)
|
||||
{ returns {\tt true} in case $x$ is a square, i.e. $x = y*y$.
|
||||
\ccPostcond $unit\_part(y) == 1$.
|
||||
}
|
||||
|
||||
%\ccHasModels
|
||||
|
|
@ -36,6 +37,5 @@ $y$ is uniquely defined up to multiplication by units.
|
|||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{AlgebraicStructureTraits}
|
||||
\end{ccAdvanced}
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
|
@ -2,23 +2,12 @@
|
|||
\ccRefChapter{Algebraic Foundations}
|
||||
%\label{ChapterRefAlgebraicFoundations}
|
||||
|
||||
\ccChapterAuthor{Michael Hemmer and Who Soever}
|
||||
\ccChapterAuthor{Michael Hemmer}
|
||||
|
||||
\section{todo:}
|
||||
\begin{itemize}
|
||||
\item add models to 'HasModels'
|
||||
\item add models to 'has models '
|
||||
\item Check types in functors
|
||||
\item Introduce a IsSquare rm IntegralSqrt\\
|
||||
\ccc{AlgebraicStructureTraits::Sqrt} has a special definition for Integer. \\
|
||||
A type may provide this functor even if the set of
|
||||
numbers it models does not contain real square roots in general.
|
||||
The most important example are number types modeling the integers.
|
||||
For them, Sqrt()(x) has to return the largest integer not exceeding
|
||||
the square root of x.\\
|
||||
In EXACUS this is used to test an integer to be an perfect square. \\
|
||||
Question: Should we introduce an extra functor for that?
|
||||
see: \ccc{AlgebraicStructureTraits::Integral_sqrt}
|
||||
|
||||
\item TODO: solve this by using unit normal within text?
|
||||
The concept \ccc{FieldWithSqrt} (also FieldWithKthRoot,FieldWithRootOf)
|
||||
implies that the number type is RealEmbeddable, in particular RootOf talks
|
||||
|
|
@ -56,6 +45,17 @@ That is: an exact \ccc{Field} may have a Sqrt functor that is not exact. \\
|
|||
Proposal: choose the unit normal (positive) remainder. In other words div is rounded to -oo.\\
|
||||
Example: -5 div 3 is -2 rest 1 \\
|
||||
This also coincides with the definition of the gcd.
|
||||
|
||||
\item \ccc{AlgebraicStructureTraits::IsSquare}: (is optional)\\
|
||||
\ccc{AlgebraicStructureTraits::Sqrt} had a special definition for Integer. \\
|
||||
A type may provide this functor even if the set of
|
||||
numbers it models does not contain real square roots in general.
|
||||
The most important example are number types modeling the integers.
|
||||
For them, Sqrt()(x) has to return the largest integer not exceeding
|
||||
the square root of x.\\
|
||||
In EXACUS this is used to test an integer to be an perfect square. \\
|
||||
\ccc{AlgebraicStructureTraits::IsSquare} has been introduced to avoid this obscure
|
||||
usage of Sqrt.
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ That is: an exact \ccc{Field} may have a Sqrt functor that is not exact. \\
|
|||
\ccRefConceptPage{AlgebraicStructureTraits::Div}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::Mod}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::Sqrt}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::IntegralSqrt}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::IsSquare}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::KthRoot}\\
|
||||
\ccRefConceptPage{AlgebraicStructureTraits::RootOf}\\
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ That is: an exact \ccc{Field} may have a Sqrt functor that is not exact. \\
|
|||
\ccRefIdfierPage{simplify}\\
|
||||
\ccRefIdfierPage{unit_part}\\
|
||||
\ccRefIdfierPage{integral_division}\\
|
||||
%\ccRefIdfierPage{integral_sqrt}\\
|
||||
%\ccRefIdfierPage{is_square}\\
|
||||
\ccRefIdfierPage{gcd}\\
|
||||
\ccRefIdfierPage{div_mod}\\
|
||||
\ccRefIdfierPage{div}\\
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_Simplify.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_UnitPart.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_IntegralDivision.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_IntegralSqrt.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_IsSquare.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_Gcd.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_DivMod.tex}
|
||||
\input{Algebraic_foundations_ref/AlgebraicStructureTraits_Div.tex}
|
||||
|
|
|
|||
Loading…
Reference in New Issue