Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #27281

Re: Javascript classes, Please take a look at my question below

From Stefan Weiss <krewecherl@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Javascript classes, Please take a look at my question below
Date 2015-04-09 21:44 +0200
Organization albasani.net
Message-ID <mg6krd$fq0$1@news.albasani.net> (permalink)
References <886ff158-ecdf-4913-8cc2-7ac2ba88b971@googlegroups.com>

Show all headers | View raw


On 2015-04-08 19:46, Rahul Reddy wrote:
> In the second step the result is split into the integer portion and
> the rest. The integer parts are attributed to the respective party as
> seats. The remaining seats are allocated to parties in the order of the
> size of the fractional portions.

I would reject this algorithm as incomplete.

    Example input: 10 seats, votes: 50 A, 35 B, 15 C

Does C get one or two seats?
What should the program do if it can't find an unambiguous distribution?

(Amusingly, Denis's solution would solve this specific example by simply
adding a seat.)

- stefan

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Javascript classes, Please take a look at my question below Rahul Reddy <rahulreddy160@gmail.com> - 2015-04-08 10:46 -0700
  Re: Javascript classes, Please take a look at my question below Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-04-09 11:14 +0200
  Re: Javascript classes, Please take a look at my question below JJ <jj4public@vfemail.net> - 2015-04-09 19:50 +0700
    Re: Javascript classes, Please take a look at my question below Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-09 16:17 +0200
      Re: Javascript classes, Please take a look at my question below JJ <jj4public@vfemail.net> - 2015-04-10 10:57 +0700
    Re: Javascript classes, Please take a look at my question below "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-09 16:37 +0200
  Re: Javascript classes, Please take a look at my question below Stefan Weiss <krewecherl@gmail.com> - 2015-04-09 21:44 +0200
    Re: Javascript classes, Please take a look at my question below Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-10 14:22 +0000
    Re: Javascript classes, Please take a look at my question below Richard Damon <Richard@Damon-Family.org> - 2015-04-11 22:14 -0400

csiph-web