The BasicDivisor is the class of divisors whose coefficients are unspecified, a base class. Not typically for use. All subtypes have the same essential structure.
RWeilDivisor is a subclass which has real coefficients.
QWeilDivisor is a further subclass with rational coefficients.
WeilDivisor is a subclass with integer coefficients.
The basic structure is a HashTable. There is one key which has a value which specifies the ambient ring. Another key is cache which points to a CacheTable. The remaining keys are a Groebner basis L for each prime ideal P in the support with corresponding value a list n, P where n is the coefficient of the prime and P is how the user entered the ideal initially (used for display purposes).
i1 : R = QQ[x,y,z]; |
i2 : D = divisor(x*y^2*z^3) o2 = 2*Div(y) + 3*Div(z) + Div(x) o2 : WeilDivisor on R |
i3 : H = new HashTable from D o3 = HashTable{{x} => {1, ideal x} } {y} => {2, ideal y} {z} => {3, ideal z} cache => CacheTable{} ring => R o3 : HashTable |
i4 : (2/3)*D o4 = 4/3*Div(y) + 2*Div(z) + 2/3*Div(x) o4 : QWeilDivisor on R |
i5 : 0.6*D o5 = 1.2*Div(y) + 1.8*Div(z) + .6*Div(x) o5 : RWeilDivisor on R |
The object BasicDivisor is a type, with ancestor classes HashTable < Thing.