Example #1
0
  def preCount(self):
    "QPQ pre-count"
    Iterative.preCount(self)

    QX.set_precision(self, self.prec)
    QX.set_guard(self, self.prec)

    self.R = 0           # current round
    self.numRounds = 0     # total number of rounds
    self.msg = []        # msg[r] contains text describing round r
    self.count = []      # count[r][c] is candidate c's quotient qc at round r

    for c in range(self.b.numCandidates):
      self.votes.append([])
Example #2
0
    def preCount(self):
        "QPQ pre-count"
        Iterative.preCount(self)

        QX.set_precision(self, self.prec)
        QX.set_guard(self, self.prec)

        self.R = 0  # current round
        self.numRounds = 0  # total number of rounds
        self.msg = []  # msg[r] contains text describing round r
        self.count = []  # count[r][c] is candidate c's quotient qc at round r

        for c in range(self.b.numCandidates):
            self.votes.append([])
Example #3
0
 def __init__(self, b):
   Iterative.__init__(self, b)
   MethodPlugin.__init__(self)
   self.threshName = ["Droop", "Dynamic", "Fractional"]
   self.prec = 10
   self.weakTieBreakMethod = "strong"  # treat all ties as strong
   self.optRestart = True              # option: restart after exclusion
   self.stopCond = ["Continuing Empty"]
   self.va = []         # va[r] is number of active ballots at round r
   self.vc = []         # vc[r][c] is candidate c's votes at round r
   # satisfy reporter
   self.exhausted = []
   self.surplus = []
   self.tc = []         # tc[r][c] is candidate c's ballots' contributions at round r
   self.tx = []         # tx[r] is contribution of inactive ballots at round r
   self.thresh = []     # thresh[r] is the winning quota at round r
   self.votes = []      # votes[c] stores the indices of all votes for candidate c.
   self.restart = False
Example #4
0
 def __init__(self, b):
     Iterative.__init__(self, b)
     MethodPlugin.__init__(self)
     self.threshName = ["Droop", "Dynamic", "Fractional"]
     self.prec = 10
     self.weakTieBreakMethod = "strong"  # treat all ties as strong
     self.optRestart = True  # option: restart after exclusion
     self.stopCond = ["Continuing Empty"]
     self.va = []  # va[r] is number of active ballots at round r
     self.vc = []  # vc[r][c] is candidate c's votes at round r
     # satisfy reporter
     self.exhausted = []
     self.surplus = []
     self.tc = [
     ]  # tc[r][c] is candidate c's ballots' contributions at round r
     self.tx = []  # tx[r] is contribution of inactive ballots at round r
     self.thresh = []  # thresh[r] is the winning quota at round r
     self.votes = [
     ]  # votes[c] stores the indices of all votes for candidate c.
     self.restart = False
Example #5
0
 def __init__(self, b):
   Iterative.__init__(self, b)
   MethodPlugin.__init__(self)
   self.prec = 0
Example #6
0
 def __init__(self, b):
   Iterative.__init__(self, b)
   MethodPlugin.__init__(self)
   self.prec = 0