ProjGeom 1.0.11
Loading...
Searching...
No Matches
fun::Ring Concept Reference

Ring concept. More...

#include <common_concepts.h>

Concept definition

template<typename K>
concept fun::Ring = STD_ALT::equality_comparable<K> && requires(K a, K pt_b) {
{ a + pt_b } -> STD_ALT::convertible_to<K>;
{ a - pt_b } -> STD_ALT::convertible_to<K>;
{ a * pt_b } -> STD_ALT::convertible_to<K>;
{ a += pt_b } -> STD_ALT::same_as<K&>;
{ a -= pt_b } -> STD_ALT::same_as<K&>;
{ a *= pt_b } -> STD_ALT::same_as<K&>;
{ -a } -> STD_ALT::convertible_to<K>;
{ K(a) } -> STD_ALT::convertible_to<K>;
{ K(0) } -> STD_ALT::convertible_to<K>;
}
Ring concept.
Definition common_concepts.h:56

Detailed Description

Ring concept.

A ring is a set with two binary operations (addition and multiplication) satisfying certain algebraic properties.

Template Parameters
KA type that supports ring operations