Commit Graph

57 Commits

Author SHA1 Message Date
RunasSudo 6bb127a124
Precompute Ballot::has_equal_rankings at parse time
Before: 5.3943 +- 0.0287
After: 5.27661 +- 0.00472
2022-08-25 21:49:50 +10:00
RunasSudo 395de771fa
Tidying up
Refactor STV options implementations into separate file
Fix/update documentation
2022-08-22 11:35:20 +10:00
RunasSudo 823f06a32b
Refactor calculation of totals, etc. 2022-08-21 07:20:21 +10:00
RunasSudo 876be9c55a
Write more efficient implementation for CandidateMap which does not rely on hashing 2022-08-21 05:24:54 +10:00
RunasSudo 4ad02c052c
Refactor HashMap for Candidates into dedicated struct (CandidateMap) 2022-08-21 03:57:37 +10:00
RunasSudo 974a56dffd
Improve performance of Candidate in HashMap by simplifying equality check 2022-08-20 23:39:15 +10:00
RunasSudo 422a198cf5
Use NoHashHasher for Candidate HashMaps to improve performance 2022-08-20 23:25:16 +10:00
RunasSudo 9a4af322ca
Avoid more allocations in fold 2022-08-20 22:33:48 +10:00
RunasSudo 35104055d9
Avoid excess allocations during fold operations 2022-08-18 23:55:39 +10:00
RunasSudo ee7ac064c7
Improve performance of realise_equal_rankings 2022-08-18 00:15:44 +10:00
RunasSudo 03af86733e
Initial implementation of --constraint-mode repeat_count 2022-04-20 19:42:20 +10:00
RunasSudo 6304e1128a
Validate well-formedness of constraints, better constraint errors 2021-10-29 23:33:27 +11:00
RunasSudo 15614a4e8f
rust-clippy linting 2021-10-28 00:30:55 +11:00
RunasSudo a641b97d1f
More work on unit/integration tests 2021-09-14 02:27:35 +10:00
RunasSudo 9817d6c199
Implement --transfers-detail 2021-09-11 18:42:15 +10:00
RunasSudo fbdc32ba30
Implement TransferTable for exclusions (WIP) 2021-09-11 01:19:38 +10:00
RunasSudo 99dbbcd5d5
Hide votes required for election in Meek STV 2021-09-10 02:41:40 +10:00
RunasSudo 523b039d2a
CSV output for bulk election 2021-09-09 13:46:10 +10:00
RunasSudo e4bfe45f49
Display up to 5 names only in web UI header, separate with line breaks 2021-09-06 02:43:33 +10:00
RunasSudo 2475b42056
Calculate loss by fraction introduced by minivoters with equal rankings 2021-09-05 00:07:59 +10:00
RunasSudo e3ca9fac47
Refactor stv::preprocess_election 2021-09-04 22:46:29 +10:00
RunasSudo a24ac3658a
Implement support for equal rankings 2021-09-04 02:30:01 +10:00
RunasSudo b0f869bf02
Initial framework for equal rankings 2021-09-04 01:56:04 +10:00
RunasSudo 27ead09960
Complete BLT writer and implement tests for file conversions 2021-09-02 22:35:10 +10:00
RunasSudo e9e1c63c9c
Implement serialised binary format 2021-09-02 17:17:45 +10:00
RunasSudo 88ab06d633
Add subcommand for BLT/CSP file conversion 2021-08-20 02:29:47 +10:00
RunasSudo 8a3361f20d
Implement papers+votes report 2021-08-17 01:14:05 +10:00
RunasSudo 94787e7677
Store vote values at the parcel level rather than the vote level
~50% increase in performance
2021-08-16 00:46:05 +10:00
RunasSudo ee1008b509
Prepare for dynamic quota: independent flag for completion of surplus transfers/exclusions 2021-08-08 21:35:03 +10:00
RunasSudo ea8c452737
Prevent bulk election and bulk exclusion violating constraints 2021-08-02 00:10:17 +10:00
RunasSudo 32e89312fa
Show stage progress during tie that occurs in the middle of a stage 2021-07-31 17:42:33 +10:00
RunasSudo 83d0a9bb80
Better error messages 2021-07-31 15:24:23 +10:00
RunasSudo bfeec6f839
Give information on BLT syntax errors 2021-07-29 17:34:34 +10:00
RunasSudo 3801d30527
Switch to handwritten BLT parser 2021-07-29 03:24:51 +10:00
RunasSudo efbcfd7f6c
Simply BLT grammar specification 2021-07-23 17:07:03 +10:00
RunasSudo cca097f943
Use Pest-based parser for BLT files
Support comments, optional newlines, etc.
2021-07-23 16:45:54 +10:00
RunasSudo 3b8ccd097e
Extend early bulk election to multiple vacancies if the leading candidates cannot be overtaken 2021-07-23 01:38:37 +10:00
RunasSudo 2ef7bf24f2
Correctly compute vote required for election when using different quotas/quota criteria 2021-07-21 13:43:16 +10:00
RunasSudo f80875b583
Implement --exclusion by_source 2021-07-19 23:15:17 +10:00
RunasSudo 0d9196a951
Refactoring 2021-06-29 16:48:02 +10:00
RunasSudo 9b73a4adf4
Remove CountStateOrRef 2021-06-29 01:27:10 +10:00
RunasSudo 05ec70830f
Fix bug with constraints
Also initialise constraint matrix with total number of seats
2021-06-27 22:36:50 +10:00
RunasSudo 38eef74e77
Implement constraints (guard-doom method) for CLI 2021-06-27 21:57:24 +10:00
RunasSudo 8829fa5a7b
Update documentation 2021-06-16 21:51:12 +10:00
RunasSudo 4ebb6474fd
Implement Meek STV 2021-06-16 18:44:24 +10:00
RunasSudo 3bbef933bb
Refactor and add documentation 2021-06-14 20:43:36 +10:00
RunasSudo 4845ebe52f
Implement --ties random 2021-06-13 03:15:15 +10:00
RunasSudo 2dc5ed963b
Implement forwards and backwards tie-breaking 2021-06-13 00:15:14 +10:00
RunasSudo 4c4099ee22
Handle withdrawn candidates 2021-06-12 00:51:31 +10:00
RunasSudo 59539d807a
Implement --normalise-ballots
This, with --sum-surplus-transfers, allows us to fully replicate the Scottish STV result
2021-06-11 21:25:58 +10:00