Code fixups
This commit is contained in:
parent
e059a6a3d9
commit
5d491687b4
@ -82,6 +82,7 @@ struct STV {
|
||||
#[clap(help_heading=Some("ROUNDING"), long, value_name="dps")]
|
||||
round_quota: Option<usize>,
|
||||
|
||||
/// How to calculate votes to credit to candidates in surplus transfers
|
||||
#[clap(help_heading=Some("ROUNDING"), long, possible_values=&["single_step", "by_value", "per_ballot"], default_value="single_step", value_name="mode")]
|
||||
sum_surplus_transfers: String,
|
||||
|
||||
@ -96,7 +97,7 @@ struct STV {
|
||||
#[clap(help_heading=Some("QUOTA"), short='c', long, possible_values=&["geq", "gt"], default_value="gt", value_name="criterion")]
|
||||
quota_criterion: String,
|
||||
|
||||
// Whether to apply a form of progressive quota
|
||||
/// Whether to apply a form of progressive quota
|
||||
#[clap(help_heading=Some("QUOTA"), long, possible_values=&["static", "ers97"], default_value="static", value_name="mode")]
|
||||
quota_mode: String,
|
||||
|
||||
@ -107,6 +108,7 @@ struct STV {
|
||||
#[clap(help_heading=Some("STV VARIANTS"), short='s', long, possible_values=&["wig", "uig", "eg", "meek"], default_value="wig", value_name="method")]
|
||||
surplus: String,
|
||||
|
||||
/// Order to distribute surpluses
|
||||
#[clap(help_heading=Some("STV VARIANTS"), long, possible_values=&["by_size", "by_order"], default_value="by_size", value_name="order")]
|
||||
surplus_order: String,
|
||||
|
||||
|
@ -60,6 +60,7 @@ fn aec_tas19_rational() {
|
||||
round_votes: Some(0),
|
||||
round_quota: Some(0),
|
||||
sum_surplus_transfers: stv::SumSurplusTransfersMode::SingleStep,
|
||||
normalise_ballots: false,
|
||||
quota: stv::QuotaType::Droop,
|
||||
quota_criterion: stv::QuotaCriterion::GreaterOrEqual,
|
||||
quota_mode: stv::QuotaMode::Static,
|
||||
|
@ -34,6 +34,7 @@ fn ers97_rational() {
|
||||
round_votes: Some(2),
|
||||
round_quota: Some(2),
|
||||
sum_surplus_transfers: stv::SumSurplusTransfersMode::SingleStep,
|
||||
normalise_ballots: false,
|
||||
quota: stv::QuotaType::DroopExact,
|
||||
quota_criterion: stv::QuotaCriterion::GreaterOrEqual,
|
||||
quota_mode: stv::QuotaMode::ERS97,
|
||||
|
@ -28,6 +28,7 @@ fn prsa1_rational() {
|
||||
round_votes: Some(3),
|
||||
round_quota: Some(3),
|
||||
sum_surplus_transfers: stv::SumSurplusTransfersMode::SingleStep,
|
||||
normalise_ballots: false,
|
||||
quota: stv::QuotaType::Droop,
|
||||
quota_criterion: stv::QuotaCriterion::GreaterOrEqual,
|
||||
quota_mode: stv::QuotaMode::Static,
|
||||
|
@ -35,6 +35,7 @@ fn scotland_linn07_fixed5() {
|
||||
round_votes: None,
|
||||
round_quota: Some(0),
|
||||
sum_surplus_transfers: stv::SumSurplusTransfersMode::PerBallot,
|
||||
normalise_ballots: true,
|
||||
quota: stv::QuotaType::Droop,
|
||||
quota_criterion: stv::QuotaCriterion::GreaterOrEqual,
|
||||
quota_mode: stv::QuotaMode::Static,
|
||||
|
Loading…
Reference in New Issue
Block a user