Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Precision = 8 MaxIterations = 1000 )
Functions ¶
This section is empty.
Types ¶
type CandidateState ¶ added in v0.5.0
type CandidateState uint8
const ( Hopeful CandidateState = 1 << iota Elected Excluded Lowest Random Hopeless Withdrawn )
func (CandidateState) Has ¶ added in v0.5.0
func (c CandidateState) Has(s CandidateState) bool
Returns true if ALL states in s are active. Logical AND.
func (CandidateState) HasAny ¶ added in v0.5.0
func (c CandidateState) HasAny(s CandidateState) bool
Returns true if ANY state in s is active. Logical OR.
type Detail ¶ added in v0.5.0
type Round ¶ added in v0.5.0
type WichmannHillRandom ¶ added in v0.4.0
Implementation based on: "Algorithm AS 183: An Efficient and Portable Pseudo-Random Number Generator" by B. A. Wichmann and I. D. Hill.
func NewWichmannHillRandom ¶ added in v0.4.0
func NewWichmannHillRandom(s1, s2, s3 int) WichmannHillRandom
Each seed should be a value between 1 and 30000.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.