diff --git a/main_package/classes/importer.py b/main_package/classes/importer.py index 8d2fcdb..d92c779 100644 --- a/main_package/classes/importer.py +++ b/main_package/classes/importer.py @@ -74,7 +74,6 @@ class Importer(): """ cols = df.columns.values[2:-1] - print(cols) df.drop(cols, axis=1, inplace=True) def drop_unneccessary_columns_in_all_frames(self): diff --git a/main_package/classes/node.py b/main_package/classes/node.py index 96ddc36..8ab6c45 100644 --- a/main_package/classes/node.py +++ b/main_package/classes/node.py @@ -1,4 +1,9 @@ +from enum import Enum +class Color(Enum): + WHITE = 0 + GRAY = 1 + BLACK = 2 class Node(): """ @@ -7,11 +12,13 @@ class Node(): del nodo stesso nel grafo rappresentato attraverso la matrice di adiacenza. :state_id: UID del nodo :node_id: int + :color: indica che il nodo sia stato visitato o meno durante la successiva BFS visit """ - def __init__(self, state_id, node_id=-1): + def __init__(self, state_id, node_id=-1, color=Color.WHITE): self.state_id = state_id self.node_id = node_id + self.color = color def __key(self): return (self.state_id) @@ -34,4 +41,6 @@ class Node(): return NotImplemented def __repr__(self): - return "<%s, %d>"% (self.state_id, self.node_id) \ No newline at end of file + return "<%s, %d, %s>"% (self.state_id, self.node_id, self.color) + +