add assertion that the input divisor is on the curve

parent be6c581d
......@@ -238,6 +238,8 @@ EffectiveBasisRRinDegree(const EffectiveDivisor& D, size_t deg) {
RRspace
RiemannRochBasis(const Divisor& D) {
assert(D.curve().get_pdefpol()->mod_eval(D.get_pos().get_g(), D.get_pos().get_f()) == 0);
assert(D.curve().get_pdefpol()->mod_eval(D.get_neg().get_g(), D.get_neg().get_f()) == 0);
BivPol h = Interpolate(D.get_pos());
EffectiveDivisor Dp = PrincipalDivisor(D.curve(), h);
EffectiveDivisor Dp2 = PositiveDifference(Dp, D.get_pos());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment