PollTally class
The main input of this package. This holds the amounts of judgments received for each grade, (from "worst" grade to "best" grade), for each proposal. Create an instance of this and provide it to the Deliberator.
Constructors
- PollTally(dynamic proposals)
- Create a Poll Tally from a List<List
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
proposals
↔ List<
ProposalTally> -
Amount of judgments received for each grade, for each proposal.
Grades are expected to be tallied from "worst" grade to "best" grade.
Example value:
[
1, 4, 5, 2, 4, 4, 2
, // Proposal A0, 1, 4, 5, 3, 4, 1
, // Proposal B … ]getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
balanceWithGrade(
{int grade = 0}) → PollTally - Balance your proposal tallies so that they all hold the same total amount of judgments, by filling the gaps with the specified grade. This adds judgments of the specified grade (default: "worst" grade), as many as needed (if any) to each proposal to balance the tallies.
-
balanceWithMedian(
) → PollTally - Balance your proposal tallies so that they all hold the same total amount of judgments, by filling the gaps with the majority|median grade. This adds judgments of the median grade, as many as needed (if any) to each proposal in order to balance the tallies.
-
estimateMissingJudgments(
) → List< int> - Internal? Returns how many judgments are missing, for each proposal, to get a balanced poll tally. Can only return positive integers (0 is considered positive).
-
normalizeWithStaticDefault(
{int grade = 0}) → PollTally -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited