@staticmethod
    def makeRandomDAG(nodeNumber):
        """
        Makes a random dag with "nodeNumber" nodes in which all nodes are 
        connected. Return value is list of edges, each of form (a, b), 
        where a and b are integers >= 0 < nodeNumber 
        referring to nodes and the edge is from a to b.
        """
        # Pick number of total edges to create
        edgeNumber = random.choice(xrange(nodeNumber - 1, 1 + (nodeNumber * (1 - nodeNumber)) / 2))
        # Make a spanning tree of edges so that nodes are connected
        edges = set(map(lambda i: (random.choice(xrange(i)), i), xrange(1, nodeNumber)))
        # Add extra random edges until there are edgeNumber edges
        while edgeNumber < len(edges):
            edges.add(JobTest.getRandomEdge(nodeNumber))
        return edges
dataset/ETHPy150Open BD2KGenomics/toil/src/toil/test/src/jobTest.py/JobTest.makeRandomDAG/swapped operands of `-`