find_divisor: Find divisor to assign seats

View source: R/biproportional-lower.R

find_divisorR Documentation

Find divisor to assign seats

Description

Find a divisor between divisor_from and divisor_to such that sum(round_func(votes/divisor)) equals target_seats

Usage

find_divisor(votes, divisor_from, divisor_to, target_seats, round_func)

Arguments

votes

votes (matrix with only one column or vector, allows to use row/colnames within round_func)

divisor_from

lower bound for divisor search range (is decreased if necessary)

divisor_to

upper bound for divisor search range (is increased if necessary)

target_seats

number of seats to distribute (single number)

round_func

rounding function

Value

divisor


polettif/proporz documentation built on Feb. 20, 2025, 11:19 a.m.