Fix bug with constraints
Also initialise constraint matrix with total number of seats
This commit is contained in:
parent
ba3db26263
commit
05ec70830f
@ -236,6 +236,11 @@ impl<'a, N: Number> CountState<'a, N> {
|
||||
cm.init();
|
||||
//println!("{}", cm);
|
||||
|
||||
// Require correct number of candidates to be elected
|
||||
let idx = vec![0; constraints.0.len()];
|
||||
cm[&idx].min = election.seats;
|
||||
cm[&idx].max = election.seats;
|
||||
|
||||
state.constraint_matrix = Some(cm);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user