Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > color scales be uniform, only on the right-hand column
- > group titles
- > set scales to be lat/lon
- > bottom subtitles on each page to say what's going on
- X > tabular
- things we need:
- > Keep track of ALL previously traveled, taking direction into account
- > Keep track of last edge traveled
- > 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
- > 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)
- assess traversal by edges, but keep stack of vertices
- *****each transit edge is a vertex?
- > 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
- > for each vertex, note the following values:
- > starting station
- > ending station
- > transit color
- > transit type
- > if starting point has mutliple lines out of it, attempt the search from each of these lines
- if edgeDict hasNode(A)
- EXAMPLE:
- let ? have connections to ! and $ be expressed as: ? | ! $
- 1 | 2 6
- 2 | 3 15
- 3 | 2 6 4
- start at A, end at Z
- put A on stack
- while stack !isEmpty
- currentNode = top of stack
- if currentNode has connection to otherNode that is not in edgeHistory:
- if connection.type == lastConnection.type
- currentNode = otherNode
- lastConnection = connection
- add lastConnection to edgeHistory
- put otherNode on stack
- else
- remove currentNode from stack
- if top of stack is Z, break while loop, return stack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement