

def _generate(self):
    dim = 10
    m = random.randrange(1, dim)
    n = random.randrange(1, dim)
    k = random.randrange(1, max(2, ((m * n) / 3)))
    operators = []
    visited = set()
    while (len(operators) < k):
        p = random.randrange((m * n))
        if (p not in visited):
            x = (p / n)
            y = (p % n)
            operators.append(Point(x, y))
            visited.add(p)
    print(m)
    print(n)
    print(operators)

dataset/ETHPy150Open algorhythms/LintCode/Number of Islands II.py TestCaseGenerator._generate/original