Optimization, Operations Research, Python, Data Science, Editors Pick.
neighbor_colors, saturation, and degree. class Node: neighbors: List['Node'] index: int color: Color def __init__(self, index): self.index = index self.neighbors = [] self.color = None def __repr__(self) -> str: return f"N{self.index}|{self.color}" def add_neighbor(self, node: 'Node'): if node not