Closed rheitjoh closed 2 years ago
@JanBobolz is this ok btw? I am asking because getInteger
explicitly states that it returns an integer in [0,n), while asInteger
just states that it inverts the whole getElement
method, meaning asInteger
could theoretically return something greater than n as long as it is still in the same equivalence class. Maybe we should clarify that or is there meant to be a difference?
No difference intendend. You can add to the Javadoc for asInteger
that the result will be between 0 and the ring's characteristic.
So since
RingElement
recently got the newasInteger
method, we should use that one instead of theZn
-specificgetInteger
method. Then we can removegetInteger
.