Advertisement
Guest User

segment.py

a guest
May 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. # Importamos la clase node.py.
  4. import node
  5.  
  6. """ Segment
  7. =======================================
  8. Creamos la clase Segment, la cual esta formada por un nodo origen, uno de destino y la distancia que los separa.
  9. """
  10.  
  11. class Segment:
  12. def __init__ (self, nodeOrg, nodeDst):
  13. self.nodeOrg = nodeOrg
  14. self.nodeDst = nodeDst
  15. self.cost = node.distance(nodeOrg,nodeDst)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement