pau-minoves / jseats Goto Github PK
View Code? Open in Web Editor NEWJSeats is a java implementation of common electoral seat allocation algorithms.
License: GNU Lesser General Public License v3.0
JSeats is a java implementation of common electoral seat allocation algorithms.
License: GNU Lesser General Public License v3.0
Hello,
I've stumbled upon your library and I haven't seen any Condorcet methods (http://en.wikipedia.org/wiki/Condorcet_method). Do you see any value on implementing those?
If so, I would implement the most common one(s)
thanks in advance,
Currently ProcessorConfig and Candidate contain contain Properties members that are left to default serialization, which is ugly at best.
Change to something like:
...
<properties>
<key>value</key>
<properties>
...
We need some test stories here.
Via @asoto.
Objects like Tally, Candidate and Result should support:
where applicable.
As a separate project, export the API as a REST service and a minimal web application to serve as a seat allocation online calculator.
A walker functionality in processor to allow for interactive execution of methods.
public class Walker {
public void step(args...) {
// log, put a message to JMS, go to console to ask user feedback, etc.
}
}
SeatAllocationProcessor.process(..., walker ,...);
walker.step() gets called in key points of the SeatAllocationMethod implementation.
This would serve both for interactive step-by-step execution of methods and for user injected logging.
We need some stories here.
Sources: http://en.wikipedia.org/wiki/United_States_House_of_Representatives
Implement the TieBreaker interface in a special TieBreakerChain that runs through a list of user provided TieBreakers in a chain-of-responsability fashion.
See: http://en.wikipedia.org/wiki/Mixed-member_proportional_representation
Used in Germany, UK and New Zealand.
Not clear if this can be implemented as a SeatAllocationMethod or a JUnit use case on top of the processor.
This depends on #17
We need some stories here.
Issue for bug on pull request #7
Scenario: Base bug scenario
Given empty scenario
Given tally has candidate CandidateA with 100 votes
Given tally has candidate CandidateB with 100 votes
Given tally has candidate CandidateC with 75 votes
Given tally has candidate CandidateD with 200 votes
Given algorithm has property numberOfSeats set to 1
Given algorithm has property groupSeatsPerCandidate set to true
When process with RankByVotes method
Then result type is TIE
Then result has 2 seats
Then result seat #0 is CandidateA
Then result seat #1 is CandidateB
!-- The tie is below the numberOfSeats threshold. Result should be SINGLE -> CandidateD
Feature from @alvarogarcia7.
There is some code to take on branch bugfix/candidate-order-on-ties.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.