instantRunoff

package
v0.0.0-...-ff8248e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstantRunoff

type InstantRunoff struct {
	Rounds  int
	Tallies []*Tally
	Winner  string
}

func Run

func Run(votes []*Vote, nameMap map[int]string) (*InstantRunoff, error)

func (*InstantRunoff) ResultsAsString

func (ir *InstantRunoff) ResultsAsString() string

type Tally

type Tally struct {
	ID         int
	Name       string
	Round      int
	Count      int
	Eliminated bool
	Winner     bool
}

type Vote

type Vote struct {
	RankedChoices []int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL