How to use the nashpy.algorithms.support_enumeration.powerset function in nashpy

To help you get started, we’ve selected a few nashpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github drvinceknight / Nashpy / tests / unit / test_support_enumeration.py View on Github external
def test_powerset(self):
        n = 2
        powerset_ = list(powerset(n))
        self.assertEqual(powerset_, [(), (0,), (1,), (0, 1)])

        n = 3
        powerset_ = list(powerset(n))
        self.assertEqual(
            powerset_, [(), (0,), (1,), (2,), (0, 1), (0, 2), (1, 2), (0, 1, 2)]
        )
github drvinceknight / Nashpy / tests / unit / test_support_enumeration.py View on Github external
def test_powerset(self):
        n = 2
        powerset_ = list(powerset(n))
        self.assertEqual(powerset_, [(), (0,), (1,), (0, 1)])

        n = 3
        powerset_ = list(powerset(n))
        self.assertEqual(
            powerset_, [(), (0,), (1,), (2,), (0, 1), (0, 2), (1, 2), (0, 1, 2)]
        )