pub fn resolve_atl<'a>(&'a self,arena : &'a typed_arena::Arena<CandidateIndex>) -> Vec<PartiallyDistributedVote<'a>> {
        let mut votes : Vec<PartiallyDistributedVote<'a>> = vec![];
        for a in & self.atl {
            let v : Vec<CandidateIndex> = a.parties.iter().flat_map(|p|self.metadata.party(*p).candidates.iter().map(|c|*c)).collect();
            let slice = arena.alloc_extend(v);
            votes.push(PartiallyDistributedVote::new(a.n,slice,VoteSource::Atl(a)));
        }
        for b in &self.btl {
            votes.push(PartiallyDistributedVote::new(b.n,b.candidates.as_slice(),VoteSource::Btl(b)));
        }
        votes
    }
/// Get a list of all votes with ATL votes converted to the corresponding BTL equivalent.
/// Requires an arena to hold interpreted preference lists. This can be allocated by
/// ```
/// use stv::ballot_metadata::CandidateIndex;
/// let arena = typed_arena::Arena::<CandidateIndex>::new();
/// ```
Get a list of all votes with ATL votes converted to the corresponding BTL equivalent.
Requires an arena to hold interpreted preference lists.
Get a list of all votes with ATL votes converted to the corresponding BTL equivalent . Requires an arena to hold interpreted preference lists .
pub fn resolve_atl<'a>(&'a self,arena : &'a typed_arena::Arena<CandidateIndex>) -> Vec<PartiallyDistributedVote<'a>> {
        let mut votes : Vec<PartiallyDistributedVote<'a>> = vec![];
        for a in & self.atl {
            let v : Vec<CandidateIndex> = a.parties.iter().flat_map(|p|self.metadata.party(*p).candidates.iter().map(|c|*c)).collect();
            let slice = arena.alloc_extend(v);
            votes.push(PartiallyDistributedVote::new(a.n,slice,VoteSource::Atl(a)));
        }
        for b in &self.btl {
            votes.push(PartiallyDistributedVote::new(b.n,b.candidates.as_slice(),VoteSource::Btl(b)));
        }
        votes
    }
pub fn resolve_atl < ' a > ( & ' a self , arena : & ' a typed_arena :: Arena < CandidateIndex > ) -> Vec < PartiallyDistributedVote < ' a > > { let mut votes : Vec < PartiallyDistributedVote < ' a > > = vec ! [ ] ; for a in & self . atl { let v : Vec < CandidateIndex > = a . parties . iter ( ) . flat_map ( | p | self . metadata . party ( * p ) . candidates . iter ( ) . map ( | c | * c ) ) . collect ( ) ; let slice = arena . alloc_extend ( v ) ; votes . push ( PartiallyDistributedVote :: new ( a . n , slice , VoteSource :: Atl ( a ) ) ) ; } for b in & self . btl { votes . push ( PartiallyDistributedVote :: new ( b . n , b . candidates . as_slice ( ) , VoteSource :: Btl ( b ) ) ) ; } votes }
Get a list of all votes with ATL votes converted to the corresponding BTL equivalent.
Get a list of all votes with ATL votes converted to the corresponding BTL equivalent .
&'a self
arena
&'a typed_arena::Arena<CandidateIndex>
&'a self
arena
&'a typed_arena::Arena<CandidateIndex>