\( \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.10.2 - Algebraic Foundations
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
AlgebraicStructureTraits_::IsSquare Concept Reference

Definition

AdaptableBinaryFunction that computes whether the first argument is a square. If the first argument is a square the second argument, which is taken by reference, contains the square root. Otherwise, the content of the second argument is undefined.

A 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 UniqueFactorizationDomain, \( y\) is uniquely defined up to multiplication by units.

Refines:
AdaptableBinaryFunction
See Also
AlgebraicStructureTraits

Types

typedef unspecified_type result_type
 Is AlgebraicStructureTraits::Boolean.
 
typedef unspecified_type first_argument
 Is AlgebraicStructureTraits::Type.
 
typedef unspecified_type second_argument
 Is AlgebraicStructureTraits::Type&.
 

Operations

result_type operator() (first_argument_type x, second_argument_type y)
 returns true in case \( x\) is a square, i.e. \( x = y*y\). More...
 
result_type operator() (first_argument_type x)
 returns true in case \( x\) is a square.
 

Member Function Documentation

result_type AlgebraicStructureTraits_::IsSquare::operator() ( first_argument_type  x,
second_argument_type  y 
)

returns true in case \( x\) is a square, i.e. \( x = y*y\).

Postcondition
\( unit\_part(y) == 1\).