Follow-up from "Implement the splitting of votes"
The following discussions from !79 (merged) should be addressed:
-
@eugenz started a discussion: (+2 comments) I've made minor changes to the documentation in this branch: keep the overview high-level, polish the paragraph about ballots. Feel free to use it if you agree. (I thought it is simpler in this way than to add comments.)
By the way, I find "weight" slightly better than "fraction", because the
x_fraction
only specifies the fraction nominator, the denominator is implicit. But that's minor. -
@mbouaziz started a discussion: We need a
uint_parameter
, or manually check that each value is non-negative -
@mbouaziz started a discussion: Nit:
of_int Constants_repr.fixed.votes_per_roll
could have been done once for all before the loop -
@mbouaziz started a discussion: You can move
Int32.of_int
inallocate
Could you also add tests:
-
where a number is negative -
where the total doesn't sum up to 100 -
where a number is negative and the total does sum up to 100