def test_DEGREE_ONE_GENERATORS(self): # for now, just checking that we do not get errors examples.p1().DEGREE_ONE_GENERATORS examples.p2().DEGREE_ONE_GENERATORS examples.p3().DEGREE_ONE_GENERATORS polymake.cube(3).DEGREE_ONE_GENERATORS polymake.cube(4).DEGREE_ONE_GENERATORS
def test_COMPLEXITY(self): c3 = polymake.cube(3) c4 = polymake.cube(4) with self.assertRaises(RuntimeError): c3.COMPLEXITY comp = c4.COMPLEXITY self.assertLess(comp, 3.14286) self.assertGreater(comp, 3.14285)
def test_EHRHART_POLYNOMIAL_COEFF(self): for pol in [ examples.p1(), examples.p3(), polymake.cube(3), polymake.cube(4) ]: v = pol.EHRHART_POLYNOMIAL_COEFF
def test_EDGE_ORIENTATION(self): m = examples.p1().EDGE_ORIENTATION with self.assertRaises(ValueError): examples.p2().EDGE_ORIENTATION with self.assertRaises(ValueError): examples.p3().EDGE_ORIENTATION m = polymake.cube(3).EDGE_ORIENTATION m = polymake.cube(4).EDGE_ORIENTATION
def test_EDGE_ORIENTABLE(self): self.assertEqual(examples.p1().EDGE_ORIENTABLE, True) # BUG: now a RuntimeError # with self.assertRaises(ValueError): # examples.p2().EDGE_ORIENTABLE # with self.assertRaises(ValueError): # examples.p3().EDGE_ORIENTABLE self.assertTrue(polymake.cube(3).EDGE_ORIENTABLE, True) self.assertTrue(polymake.cube(4).EDGE_ORIENTABLE, True)
def test_DUAL_GRAPH(self): for pol in [ examples.p1(), examples.p2(), examples.p3(), polymake.cube(3), polymake.cube(4) ]: g = pol.DUAL_GRAPH self.assertTrue(g.type_name().startswith('Graph<Undirected>'))
def test_CD_INDEX_COEFFICIENTS(self): # for now, jut checking that we do not get errors examples.p1().CD_INDEX_COEFFICIENTS examples.p2().CD_INDEX_COEFFICIENTS examples.p3().CD_INDEX_COEFFICIENTS polymake.cube(3).CD_INDEX_COEFFICIENTS
def test_ESSENTIALLY_GENERIC(self): self.assertFalse(examples.p1().ESSENTIALLY_GENERIC) self.assertFalse(examples.p2().ESSENTIALLY_GENERIC) self.assertTrue(examples.p3().ESSENTIALLY_GENERIC) self.assertFalse(polymake.cube(3).ESSENTIALLY_GENERIC) self.assertFalse(polymake.cube(4).ESSENTIALLY_GENERIC)
def test_EHRHART_POLYNOMIAL_COEFF(self): for pol in [examples.p1(), examples.p3(), polymake.cube(3), polymake.cube(4)]: v = pol.EHRHART_POLYNOMIAL_COEFF
def test_DUAL_GRAPH(self): for pol in [examples.p1(), examples.p2(), examples.p3(), polymake.cube(3), polymake.cube(4)]: g = pol.DUAL_GRAPH self.assertTrue(g.type_name().startswith('Graph<Undirected>'))
def test_CUBICAL(self): self.assertTrue(examples.p1().CUBICAL) self.assertFalse(examples.p2().CUBICAL) self.assertTrue(examples.p3().CUBICAL) self.assertTrue(polymake.cube(3).CUBICAL)
def test_CS_PERMUTATION(self): with self.assertRaises(ValueError): examples.p1().CS_PERMUTATION polymake.cube(3).CS_PERMUTATION