Ejemplo n.º 1
0
    def test_colinear(self):
        H = x**4 + x**2*y**2 + y**4
        self.assertEqual(newton_polygon(H),
                         [[(0,4),(2,2),(4,0)]])

        H = x**4 + x**2*y**2 + x*y**3 + y**4
        self.assertEqual(newton_polygon(H),
                         [[(0,4),(2,2),(3,1),(4,0)]])
Ejemplo n.º 2
0
    def test_segment(self):
        H = y + x
        self.assertEqual(newton_polygon(H),
                         [[(0,1),(1,0)]])

        H = y**2 + x**2
        self.assertEqual(newton_polygon(H),
                         [[(0,2),(2,0)]])
Ejemplo n.º 3
0
    def test_general_to_colinear(self):
        H = x**5 + x**2 * y**2 + y**4
        self.assertEqual(newton_polygon(H), [[(0, 4), (2, 2), (4, 0)]])

        H = x**5 + x**3 * y + x**2 * y**2 + y**4
        self.assertEqual(newton_polygon(H), [[(0, 4), (1, 3), (2, 2), (4, 0)]])

        H = x**5 + x**2 * y**2 + x * y**3 + y**4
        self.assertEqual(newton_polygon(H), [[(0, 4), (2, 2), (3, 1), (4, 0)]])
Ejemplo n.º 4
0
    def test_general_to_colinear(self):
        H = x**5 + x**2*y**2 + y**4
        self.assertEqual(newton_polygon(H),
                         [[(0,4),(2,2),(4,0)]])

        H = x**5 + x**3*y + x**2*y**2 + y**4
        self.assertEqual(newton_polygon(H),
                         [[(0,4),(1,3),(2,2),(4,0)]])

        H = x**5 + x**2*y**2 + x*y**3 + y**4
        self.assertEqual(newton_polygon(H),
                         [[(0,4),(2,2),(3,1),(4,0)]])
Ejemplo n.º 5
0
 def test_issue111(self):
     H = -x**8 + y**4 + x * y**2
     N = newton_polygon(H)
Ejemplo n.º 6
0
 def test_multiple(self):
     H = 2 * x**2 + 3 * x * y + 5 * y**3
     self.assertEqual(newton_polygon(H), [[(0, 2), (1, 1)], [(1, 1),
                                                             (3, 0)]])
Ejemplo n.º 7
0
    def test_colinear(self):
        H = x**4 + x**2 * y**2 + y**4
        self.assertEqual(newton_polygon(H), [[(0, 4), (2, 2), (4, 0)]])

        H = x**4 + x**2 * y**2 + x * y**3 + y**4
        self.assertEqual(newton_polygon(H), [[(0, 4), (2, 2), (3, 1), (4, 0)]])
Ejemplo n.º 8
0
 def test_general_segment(self):
     H = y**2 + x**4
     self.assertEqual(newton_polygon(H), [[(0, 2), (2, 0)]])
Ejemplo n.º 9
0
    def test_segment(self):
        H = y + x
        self.assertEqual(newton_polygon(H), [[(0, 1), (1, 0)]])

        H = y**2 + x**2
        self.assertEqual(newton_polygon(H), [[(0, 2), (2, 0)]])
Ejemplo n.º 10
0
 def test_issue111(self):
     H = -x**8 + y**4 + x*y**2
     N = newton_polygon(H)
Ejemplo n.º 11
0
 def test_multiple(self):
     H = 2*x**2 + 3*x*y + 5*y**3
     self.assertEqual(newton_polygon(H),
                      [[(0,2),(1,1)], [(1,1),(3,0)]])
Ejemplo n.º 12
0
 def test_general_segment(self):
     H = y**2 + x**4
     self.assertEqual(newton_polygon(H),
                      [[(0,2),(2,0)]])