Trait frame_election_provider_support::NposSolver[][src]

pub trait NposSolver {
    type AccountId: IdentifierT;
    type Accuracy: PerThing128;
    type Error: Debug + PartialEq;
    fn solve(
        to_elect: usize,
        targets: Vec<Self::AccountId>,
        voters: Vec<(Self::AccountId, VoteWeight, Vec<Self::AccountId>)>
    ) -> Result<ElectionResult<Self::AccountId, Self::Accuracy>, Self::Error>; }
Expand description

Something that can compute the result to an NPoS solution.

Associated Types

The account identifier type of this solver.

The accuracy of this solver. This will affect the accuracy of the output.

The error type of this implementation.

Required methods

Solve an NPoS solution with the given voters, targets, and select to_elect count of targets.

Implementors