Coder Social home page Coder Social logo

jseats's People

Contributors

alvarogarcia7 avatar pau-minoves avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jseats's Issues

Prettify XML properties serialization

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>
...

Walker functionality

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.

Implement TieBreakerChain

Implement the TieBreaker interface in a special TieBreakerChain that runs through a list of user provided TieBreakers in a chain-of-responsability fashion.

RankByVotes should not mind the order in the tallysheet

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.