def getUtilities(self, decision, binaryRelations):
        m = len(binaryRelations)
        utilities = []
        for cand in decision:
            tops = [cand-1]
            index = 0
            while index < len(tops):
                s = tops[index]
                for j in range(m):
                    if j == s:
                        continue
                    if binaryRelations[j][s] > 0:
                        if j not in tops:
                            tops.append(j)
                index += 1
            if len(tops) <= self.k:
                if self.isLoss == False:
                    utilities.append(1.0)
                elif self.isLoss == True:
                    utilities.append(-1.0)
            else:
                utilities.append(0.0)
        return utilities