C# 클래스 ElectionsMandateCalculator.Models.MandatesCalculator

파일 보기 프로젝트 열기: elections-contest/pe2013 1 사용 예제들

공개 메소드들

메소드 설명
CalculateMandates ( ) : List

Main method that calculate mandates depending on the input data of the current class

MandatesCalculator ( IEnumerable mirs, IEnumerable parties, IEnumerable votes, IEnumerable lots ) : System

비공개 메소드들

메소드 설명
ExcludePartiesThatDoNotPass4PercentBarrier ( int partiesCountTable1, bool workingPartyFlagsTable1, int _mirVotesCountTable1, int _partyVotesCountTable1 ) : void
GenerateResultsByPartyAndMir ( List partiesWithCalcInfo, List mirsWithCalcInfo, MirPartyCalcInfo mirPartyTable ) : void
GiveAdditionalMandatesOnNationalLevel ( int partiesCountTable2, List &partiesWithCalcInfo, int &mandatesLeft ) : void
GiveInitialAdditionalMandatesByMirs ( int mirsCount, int votesTable2, int partiesCountTable2, List partiesWithCalcInfo, List mirsWithCalcInfo ) : ].MirPartyCalcInfo[
GiveInitialMandatesOnNationalLevel ( int mirsCount, int partiesCountTable1, int votesTable2, Party partiesTable2, int partiesCountInTable2, int partiesCountTable2, int allMandatesAfterStep0, int allVotesTable2, List &partiesWithCalcInfo, List &mirsWithCalcInfo, int &mandatesLeft ) : void
GiveMandatesToInitiaitiveCandidatesInMirs ( int mirsCount, int partiesCountTable1, bool workingPartyFlagsTable1, int votesTable1, decimal _mirMandateQuotesTable1 ) : void
InitWorkingData ( int &mirsCount, int &partiesCountTable1, bool &workingPartyFlagsTable1, int &votesTable1, int &_mirVotesCountTable1, int &_partyVotesCountTable1, decimal &_mirMandateQuotesTable1 ) : void
LogNationalMandatesByParties ( List partiesWithCalcInfo ) : void
PrepareWorkingDataForNationalMandateGiving ( int mirsCount, int partiesCountTable1, bool workingPartyFlagsTable1, int votesTable1, int &partiesCountInTable2, int &votesTable2, Party &partiesTable2, int &partiesCountTable2, int &allMandatesAfterStep0, int &allVotesTable2 ) : void
SatisfyAllParties ( List partiesWithCalcInfo, MirPartyCalcInfo mirPartyTable ) : void

메소드 상세

CalculateMandates() 공개 메소드

Main method that calculate mandates depending on the input data of the current class
public CalculateMandates ( ) : List
리턴 List

MandatesCalculator() 공개 메소드

public MandatesCalculator ( IEnumerable mirs, IEnumerable parties, IEnumerable votes, IEnumerable lots ) : System
mirs IEnumerable
parties IEnumerable
votes IEnumerable
lots IEnumerable
리턴 System