-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Enhance the ring submodule
The ring submodule consists of the definition of several class to work with rings in a symbolic way. The class have the following names
D: Ring of dyadic fractions.Zsqrt2: Ring of quadratic integers with radicand 2.Dsqrt2: Ring of quadratic dyadic fractions with radicand 2.Zomega: Ring of cyclotomic integers of degree 8.Domega: Ring of cyclotomic dyadic fractions of degree 8.
Those class would need the following changes:
-
Change the name of the class to make them more clear and explicit. For instance, an option could be to add Ring to the names (DRing, ZSqrt2Ring, ZOmegaRing, etc.).
-
Optimise the code structure to share methods and reuse some code. This could be done through class inheritance or by using an abstract parent class for all of them.
The ring classes should probably inherit from a common (possibly abstract) base class, since quite a few of the methods are very similar or even identical. It could even be worth looking into whether they should inherit from each other (for example, an integer ring class, with a sqrt2 subclass, etc.).
mixin classes is another tool that could be looked into, although I don't think it fits in very well here.
Originally posted by @thisac in #31 (review)