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

a class for elements with the capabilities of ring arithmetic More...

#include <rings.hpp>

Inheritance diagram for Rings::Ring_Element:
Rings::Commutative_Ring_Element Rings::Mod< T, p > Rings::Integral_Domain_Element Rings::Mod< T, m > Rings::Polynomial< R > Rings::Modp< T, p > Rings::Field_Element Rings::Integer< T > Rings::Modp< T, p > Rings::Rational< T >

Public Member Functions

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 has_inverse () const =0
 should be True iff element has a multiplicative inverse
 
virtual bool is_commutative () const
 should be True iff element commutes under multiplication
 
virtual bool is_cancellable () const
 should be True iff element can cancel across an equation; e.g., \(ax=ay\Rightarrow x=y\).
 
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 class for elements with the capabilities of ring arithmetic


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