Added presentation of implementaions.

This commit is contained in:
Bartosz 2021-11-15 15:01:34 +01:00
parent 85995b3d16
commit 8c680e235e
5 changed files with 6 additions and 4 deletions

Binary file not shown.

View File

@ -68,7 +68,8 @@ if __name__ == "__main__":
(3, 1): 4, (3, 1): 4,
(6, 2): 3, (6, 2): 3,
(8, 6): 8, (8, 6): 8,
(8, 3): 2 (8, 3): 2,
(9, 1): 8
} }
v = dict() v = dict()

View File

@ -139,7 +139,8 @@ if __name__ == "__main__":
(3, 1): 4, (3, 1): 4,
(6, 2): 3, (6, 2): 3,
(8, 6): 8, (8, 6): 8,
(8, 3): 2 (8, 3): 2,
(9, 1): 8
} }
v = dict() v = dict()
@ -147,4 +148,4 @@ if __name__ == "__main__":
v[i[0]] = [] v[i[0]] = []
v[i[1]] = [] v[i[1]] = []
print(bidirectional_algorithm(g, v, 7, 8, heuristic_cost)) print(bidirectional_algorithm(g, v, 7, 10, heuristic_cost))

View File

@ -4,7 +4,7 @@ import algorithms.a_star as a_star
import algorithms.bidirectional as bidirectional import algorithms.bidirectional as bidirectional
if __name__ == '__main__': if __name__ == '__main__':
g = op_file.read_graph_from_file("dataset/deezer_clean_data/HR_edgeswith_weight.csv", has_weight=True) g = op_file.read_graph_from_file("dataset/deezer_clean_data/HR_edges_with_weight.csv", has_weight=True)
v = dict() v = dict()
for i in g.keys(): for i in g.keys():
v[i[0]] = [] v[i[0]] = []