CGAL 5.3 - Algebraic Foundations
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:
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.

## ◆ operator()()

 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$$.