cgal/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/AlgebraicStructureTraits_Sq...

41 lines
1.1 KiB
TeX

\begin{ccRefConcept}{AlgebraicStructureTraits::Sqrt}
\ccDefinition
\ccc{AdaptableUnaryFunction} providing the square root.
\ccRefines
\ccc{AdaptableUnaryFunction}
\ccSetThreeColumns{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}{xxx}{}
\ccTypes
\ccTypedef{typedef AlgebraicStructureTraits::AS result_type;}{}\ccGlue
\ccTypedef{typedef AlgebraicStructureTraits::AS first_argument_type;}{}
\ccOperations
\ccMethod{result_type operator()(
const first_argument_type& x);}{ returns $\sqrt(x)$.\\
{\tt
NOTE: There are models that provide an exact sqrt i.e. CORE::Expr
There are models that provide an inexact sqrt i.e. double \\
BUT FROM EXACUS: \\
A number type NT(here AS) 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.\\}
}
%\ccHasModels
\ccSeeAlso
\ccRefIdfierPage{AlgebraicStructureTraits}
\end{ccRefConcept}