|
Rings for MAT 685
Mathematical ring implementation to demonstrate templates and inheritance
|
a field is an integral domain whose nonzero elements have inverses More...
#include <rings.hpp>
Public Member Functions | |
| virtual bool | has_inverse () const override |
| fields are integral domains where nonzero elements have inverses | |
| virtual Field_Element & | operator/ (const Field_Element &) const =0 |
| division: other element should be of same type, use a cast | |
| virtual Field_Element & | inverse () const =0 |
| multiplicative inverse | |
Public Member Functions inherited from Rings::Integral_Domain_Element | |
| virtual bool | is_cancellable () const override |
| integral domains are commutative rings without zero divisors, so the element should be cancellable (see description of class) | |
Public Member Functions inherited from Rings::Commutative_Ring_Element | |
| virtual bool | is_commutative () const override |
| Duh. | |
Public Member Functions inherited from Rings::Ring_Element | |
| virtual bool | is_one () const =0 |
should be True iff element is multiplicative identity | |
| virtual bool | is_zero () const =0 |
should be True iff element is additive identity | |
| virtual bool | operator== (const Ring_Element &) const =0 |
| comparison: other element has same value | |
| virtual bool | operator!= (const Ring_Element &) const =0 |
| comparison: other element has different value | |
| virtual const Ring_Element & | operator+ (const Ring_Element &) const =0 |
| addition: other element should be of same type, use a cast | |
| virtual const Ring_Element & | operator- (const Ring_Element &) const =0 |
| subtraction: other element should be of same type, use a cast | |
| virtual const Ring_Element & | operator* (const Ring_Element &) const =0 |
| multiplicationL other element should be of same type, use a cast | |
a field is an integral domain whose nonzero elements have inverses
1.8.13