Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. > color scales be uniform, only on the right-hand column
  2. > group titles
  3. > set scales to be lat/lon
  4. > bottom subtitles on each page to say what's going on
  5. X > tabular
  6.  
  7. things we need:
  8. > Keep track of ALL previously traveled, taking direction into account
  9. > Keep track of last edge traveled
  10. > a table of edge type and color to be referenced against the last edge traveled: if they're compatible (IE: same color/type), traversal is OK
  11. > output before starting: "is station A where you want to begin your search?" / "is station j your desired destination?" yes/no, if no then specify desired ID (assume first vertex given is start and last one introduced is end)
  12.  
  13. assess traversal by edges, but keep stack of vertices
  14.  
  15. *****each transit edge is a vertex?
  16. > make graph with duplicate vertices for going both ways? (G->H AND H->G), this will allow you to make one loop to return to a station w/ new permissions but prevents getting stuck, allows for typical "visited" notation
  17. > for each vertex, note the following values:
  18. > starting station
  19. > ending station
  20. > transit color
  21. > transit type
  22. > if starting point has mutliple lines out of it, attempt the search from each of these lines
  23. if edgeDict hasNode(A)
  24.  
  25. EXAMPLE:
  26. let ? have connections to ! and $ be expressed as: ? | ! $
  27. 1 | 2 6
  28. 2 | 3 15
  29. 3 | 2 6 4
  30.  
  31. start at A, end at Z
  32. put A on stack
  33.  
  34. while stack !isEmpty
  35. currentNode = top of stack
  36. if currentNode has connection to otherNode that is not in edgeHistory:
  37. if connection.type == lastConnection.type
  38. currentNode = otherNode
  39. lastConnection = connection
  40. add lastConnection to edgeHistory
  41. put otherNode on stack
  42. else
  43. remove currentNode from stack
  44.  
  45. if top of stack is Z, break while loop, return stack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement