Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByVotes ¶
type ByVotes MeekCandidates
type CandidateStatus ¶
type CandidateStatus string
const ( Elected CandidateStatus = "Elected" NewlyElected CandidateStatus = "NewlyElected" Hopeful CandidateStatus = "Hopeful" Excluded CandidateStatus = "Excluded" Almost CandidateStatus = "Almost" )
type MeekCandidate ¶
type MeekCandidate struct {
election.Candidate
Status CandidateStatus
Weight int64
Votes int64
}
func (*MeekCandidate) AsCandidate ¶
func (meekCandidate *MeekCandidate) AsCandidate() election.Candidate
type MeekCandidates ¶
type MeekCandidates []*MeekCandidate
func (MeekCandidates) AsCandidates ¶
func (meekCandidates MeekCandidates) AsCandidates() election.Candidates
type MeekStv ¶
func NewMeekStv ¶
func NewMeekStv() MeekStv
type Pool ¶
type Pool interface {
Candidate(id string) *MeekCandidate
SetVotes(id string, votes int64)
Lowest() MeekCandidates
Candidates() MeekCandidates
Count() int
Elected() MeekCandidates
Hopeful() MeekCandidates
NewlyElected() MeekCandidates
Almost() MeekCandidates
ElectedCount() int
ExcludedCount() int
Elect(id string)
ElectAllNewlyElected()
NewlyElect(id string)
SetAlmost(id string)
ElectHopeful()
AddNewCandidates(candidates election.Candidates, scale int64)
Exclude(id string) *MeekCandidate
ExcludeByName(name string) MeekCandidates
ExcludeHopeful()
SetWeight(id string, weight int64)
ZeroAllVotes()
CandidateSummaries() []election.CandidateSummary
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.