Rings for MAT 685
Mathematical ring implementation to demonstrate templates and inheritance
Public Member Functions | List of all members
Rings::Field_Element Class Referenceabstract

a field is an integral domain whose nonzero elements have inverses More...

#include <rings.hpp>

Inheritance diagram for Rings::Field_Element:
Rings::Integral_Domain_Element Rings::Commutative_Ring_Element Rings::Ring_Element Rings::Modp< T, p > Rings::Rational< T >

Public Member Functions

virtual bool has_inverse () const override
 fields are integral domains where nonzero elements have inverses
 
virtual Field_Elementoperator/ (const Field_Element &) const =0
 division: other element should be of same type, use a cast
 
virtual Field_Elementinverse () 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_Elementoperator+ (const Ring_Element &) const =0
 addition: other element should be of same type, use a cast
 
virtual const Ring_Elementoperator- (const Ring_Element &) const =0
 subtraction: other element should be of same type, use a cast
 
virtual const Ring_Elementoperator* (const Ring_Element &) const =0
 multiplicationL other element should be of same type, use a cast
 

Detailed Description

a field is an integral domain whose nonzero elements have inverses


The documentation for this class was generated from the following file: