Refactoring: put redundant code of InterferenceFunction2D*Items in new base class
Before I continue with the refactoring, I wanted to ask for feedback about an issue.
To keep text short and to not obfuscate the important differences I will use "IF" as an abbreviation for "InterferenceFunction". So after looking at the code I noticed that IF2DLatticeItem
, IF2DParaCrystalItem
and IFFinite2DLatticeItem
had redundant code, e.g. all used the attributes P_LATTICE_TYPE
and P_XI_INTEGRATION
and had the same member function update_rotation_availability
. Thus I introduced a new class IFLatticeItem
which serves as a base class for the classes mentioned and contains the common code.
Now I'm not sure about the naming: is IFLatticeItem
a good name or not? I thought maybe IF2DLatticeItem
would be a better name, but a class with that name already exists. But maybe that class should be better named IFInfinite2DLatticeItem
because that is what it is if I understand the documentation correctly ?
So the question basically boils down to: Which is better ?
IFLatticeItem
as the name of the base class and keep the other names ? Or IF2DLatticeItem
for the base class and rename IF2DLatticeItem
(old) to IFInfinite2DLatticeItem
and keep the names of the other two classes ? Or another suggestion ?