# Path: common/heuristic.py
# def euclidean(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return math.sqrt(sum([(x1-x2)*(x1-x2) for x1, x2 in zip(vec1, vec2)]))
# 
# def chebyshev(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return max([math.fabs(x1 - x2) for x1, x2 in zip(vec1, vec2)])
# 
# def manhattan(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return sum([math.fabs(x1 - x2) for x1, x2 in zip(vec1, vec2)])


from unittest import TestCase
from common.heuristic import euclidean, chebyshev, manhattan
            self.assertTrue(False)
        except AssertionError as ae:
            self.assertTrue(True)

    def test_chebyshev1(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1, 2]

        self.assertTrue(chebyshev(v1, v2) == 0.0)

    def test_chebyshev2(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 5, 5]

        self.assertTrue(chebyshev(v1, v2) == 4.0)

    def test_chebyshev3(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1]

        try:
            chebyshev(v1, v2)
            self.assertTrue(False)
        except AssertionError as ae:
            self.assertTrue(True)

    def test_manhattan1(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1, 2]


# Path: common/heuristic.py
# def euclidean(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return math.sqrt(sum([(x1-x2)*(x1-x2) for x1, x2 in zip(vec1, vec2)]))
# 
# def chebyshev(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return max([math.fabs(x1 - x2) for x1, x2 in zip(vec1, vec2)])
# 
# def manhattan(vec1, vec2):
#     assert len(vec1) == len(vec2)
# 
#     return sum([math.fabs(x1 - x2) for x1, x2 in zip(vec1, vec2)])


# Path: tests/common/heuristic_test.py
from unittest import TestCase
from common.heuristic import euclidean, chebyshev, manhattan

            self.assertTrue(False)
        except AssertionError as ae:
            self.assertTrue(True)

    def test_chebyshev1(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1, 2]

        self.assertTrue(chebyshev(v1, v2) == 0.0)

    def test_chebyshev2(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 5, 5]

        self.assertTrue(chebyshev(v1, v2) == 4.0)

    def test_chebyshev3(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1]

        try:
            chebyshev(v1, v2)
            self.assertTrue(False)
        except AssertionError as ae:
            self.assertTrue(True)

    def test_manhattan1(self):
        v1 = [0, 1, 1, 2]
        v2 = [0, 1, 1, 2]


        self.assertTrue(manhattan(v1, v2) == 0.0)