Arguments: id - input an id to identify the vertex Attributes: neighbors - a list of the vertices it is linked to edges - a dict to store the edges's weight
(self, id_)
| 14 | """Class Vertex.""" |
| 15 | |
| 16 | def __init__(self, id_): |
| 17 | """ |
| 18 | Arguments: |
| 19 | id - input an id to identify the vertex |
| 20 | Attributes: |
| 21 | neighbors - a list of the vertices it is linked to |
| 22 | edges - a dict to store the edges's weight |
| 23 | """ |
| 24 | self.id = str(id_) |
| 25 | self.key = None |
| 26 | self.pi = None |
| 27 | self.neighbors = [] |
| 28 | self.edges = {} # {vertex:distance} |
| 29 | |
| 30 | def __lt__(self, other): |
| 31 | """Comparison rule to < operator.""" |
nothing calls this directly
no outgoing calls
no test coverage detected