FunctionObjectConcept

AlgebraicStructureTraits::Divides

Definition

AdaptableBinaryFunction, returns true if the first argument divides the second argument.

Integral division (a.k.a. exact division or division without remainder) maps ring elements (n,d) to ring element c such that n = dc if such a c exists. In this case it is said that d divides n.

This functor is required to provide two operators. The first operator takes two arguments and returns true if the first argument divides the second argument. The second operator returns c via the additional third argument.

Refines

AdaptableBinaryFunction

Types

AlgebraicStructureTraits::Divides::result_type
Is AlgebraicStructureTraits::Boolean.

AlgebraicStructureTraits::Divides::first_argument
Is AlgebraicStructureTraits::Type.

AlgebraicStructureTraits::Divides::second_argument
Is AlgebraicStructureTraits::Type.

Operations

result_type divides ( first_argument_type d , second_argument_type n )
Computes whether d divides n.

result_type divides ( first_argument_type d , second_argument_type n , AlgebraicStructureTraits::Type& c )
Computes whether d divides n. Moreover it computes c if d divides n, otherwise the value of c is undefined.

See Also

AlgebraicStructureTraits
AlgebraicStructureTraits::IntegralDivision