Regina 7.4 Calculation Engine
|
A helper class that instructs Regina how to do mathematical operations with objects from any ring type T. More...
A helper class that instructs Regina how to do mathematical operations with objects from any ring type T.
Before specialising RingTraits<T>
, you should ensure that T satisfies the following requirements:
+
, -
and *
, and unary operators +=
, -=
and *=
.The type RingTraits<T>
should then provide:
zero
and one
, which are objects of type T that hold the additive and multiplicative identities respectively.Regina specialises RingTraits for its own ring-like classes where this makes sense (e.g., Regina's own integer, rational and polynomial classes), and also provides implementations for native C++ signed integer and floating point types.