referrerpolicy=no-referrer-when-downgrade

Function sp_npos_elections::phragmen::seq_phragmen_core

source ·
pub fn seq_phragmen_core<AccountId: IdentifierT>(
    to_elect: usize,
    candidates: Vec<CandidatePtr<AccountId>>,
    voters: Vec<Voter<AccountId>>,
) -> Result<(Vec<CandidatePtr<AccountId>>, Vec<Voter<AccountId>>), Error>
Expand description

Core implementation of seq-phragmen.

This is the internal implementation that works with the types defined in this crate. see seq_phragmen for more information. This function is left public in case a crate needs to use the implementation in a custom way.

This can only fail if the normalization fails.