Given a order vector V and a proposed order vector W, calculate the acceptance ratio for 
        changing to W when using MCMC.

        ivar: dict<int,<dict,<int,int>>> wmg: A two-dimensional dictionary that associates integer
            representations of each pair of candidates, cand1 and cand2, with the number of times
            cand1 is ranked above cand2 minus the number of times cand2 is ranked above cand1. The
            dictionary represents a weighted majority graph for an election.
        :ivar float phi: A value for phi such that 0 <= phi <= 1.   
        :ivar list<int> V: Contains integer representations of each candidate in order of their
            ranking in a vote, from first to last. This is the current sample.
        :ivar list<int> W: Contains integer representations of each candidate in order of their
            ranking in a vote, from first to last. This is the proposed sample.

def calcAcceptanceRatio(self, V, W):
        """
        Given a order vector V and a proposed order vector W, calculate the acceptance ratio for 
        changing to W when using MCMC.

        ivar: dict<int,<dict,<int,int>>> wmg: A two-dimensional dictionary that associates integer
            representations of each pair of candidates, cand1 and cand2, with the number of times
            cand1 is ranked above cand2 minus the number of times cand2 is ranked above cand1. The
            dictionary represents a weighted majority graph for an election.
        :ivar float phi: A value for phi such that 0 <= phi <= 1.   
        :ivar list<int> V: Contains integer representations of each candidate in order of their
            ranking in a vote, from first to last. This is the current sample.
        :ivar list<int> W: Contains integer representations of each candidate in order of their
            ranking in a vote, from first to last. This is the proposed sample.
        """

        acceptanceRatio = 1.0
        for comb in itertools.combinations(V, 2):

            #Check if comb[0] is ranked before comb[1] in V and W
            vIOverJ = 1
            wIOverJ = 1
            if V.index(comb[0]) > V.index(comb[1]):
                vIOverJ = 0
            if W.index(comb[0]) > W.index(comb[1]):
                wIOverJ = 0
        
            acceptanceRatio = acceptanceRatio * self.phi**(self.wmg[comb[0]][comb[1]]*(vIOverJ-wIOverJ))
        return acceptanceRatio