NTLib - Number Theory Library 0.9
Loading...
Searching...
No Matches
ntlib::Integer Concept Referenceexport
module base

Restricts to types modeling the integers. More...

Concept definition

template<typename T>
concept Integer =
Ring<T> && HasDivisionWithRemainder<T> && std::totally_ordered<T>
Restricts to types supporting division with remainder.
Definition concepts.cpp:333
Restricts to types modeling the integers.
Definition concepts.cpp:355
Restricts to types modeling a ring.
Definition concepts.cpp:302

Detailed Description

Restricts to types modeling the integers.

Note
Strictly speaking, this concept restricts only to ordered Euclidean rings as there is currently no need for NTLib to distinguish those and integers. If this changes in the future, then new intermediate concepts could be added while this concept can be refined.
To better model the integers, the following could be considered:
  • Exclude rings with nonzero zero-divisors. This would require another Boolean customization point in ntlib::algebra_traits. Then, this concept would restrict to integral domains.
Template Parameters
TA set that acts as an ordered Euclidean ring..