C# Class ElectroChecker.Utils

Show file Open project: HackerDom/ructfe-2015

Public Methods

Method Description
AddVoteVector ( this first, int second ) : void
FindWinner ( int votes ) : int
GenRandomAlphaNumeric ( int minLen = 6, int plusRandomLen = 2 ) : string
GenRandomElectionName ( string prefix = "Election" ) : string
GenRandomVoteVector ( int vectorSize ) : int[]
GenRandomVoteVectors ( int vectorSize, int votersCount ) : IEnumerable
GenVoteVector ( int count, int winner ) : int[]
SumVoteVectors ( List votes ) : int[]

Method Details

AddVoteVector() public static method

public static AddVoteVector ( this first, int second ) : void
first this
second int
return void

FindWinner() public static method

public static FindWinner ( int votes ) : int
votes int
return int

GenRandomAlphaNumeric() public static method

public static GenRandomAlphaNumeric ( int minLen = 6, int plusRandomLen = 2 ) : string
minLen int
plusRandomLen int
return string

GenRandomElectionName() public static method

public static GenRandomElectionName ( string prefix = "Election" ) : string
prefix string
return string

GenRandomVoteVector() public static method

public static GenRandomVoteVector ( int vectorSize ) : int[]
vectorSize int
return int[]

GenRandomVoteVectors() public static method

public static GenRandomVoteVectors ( int vectorSize, int votersCount ) : IEnumerable
vectorSize int
votersCount int
return IEnumerable

GenVoteVector() public static method

public static GenVoteVector ( int count, int winner ) : int[]
count int
winner int
return int[]

SumVoteVectors() public static method

public static SumVoteVectors ( List votes ) : int[]
votes List
return int[]