Returns a dictionary that associates integer representations of each candidate with their
        Bucklin score.

        :ivar Profile profile: A Profile object that represents an election profile.

def getCandScoresMap(self, profile):
        """
        Returns a dictionary that associates integer representations of each candidate with their
        Bucklin score.

        :ivar Profile profile: A Profile object that represents an election profile.
        """

        # Currently, we expect the profile to contain complete ordering over candidates.
        elecType = profile.getElecType()
        if elecType != "soc" and elecType != "toc":
            print("ERROR: unsupported profile type")
            exit()

        bucklinScores = dict()
        rankMaps = profile.getRankMaps()
        preferenceCounts = profile.getPreferenceCounts()
        for cand in profile.candMap.keys():

            # We keep track of the number of times a candidate is ranked in the first t positions.
            numTimesRanked = 0

            # We increase t in increments of 1 until we find t such that the candidate is ranked in the
            # first t positions in at least half the votes.
            for t in range(1, profile.numCands + 1):
                for i in range(0, len(rankMaps)):
                    if (rankMaps[i][cand] == t):
                        numTimesRanked += preferenceCounts[i]
                if numTimesRanked >= math.ceil(float(profile.numVoters) / 2):
                    bucklinScores[cand] = t
                    break

        return bucklinScores