I'm a software engineer, get me out of here: Difference between revisions

Content deleted Content added
Rdm (talk | contribs)
m →‎J Part 2: need patched version of fingers which type </syntaxhighlight> rather than </lang>
Rdm (talk | contribs)
m →‎J Extra Credit: restore full definition of HQ
Line 749:
Locations are generally represented by a pair of indices (row, column) into the above structures. But for the floyd warshall algorithm we need a distance graph. To translate between the graph format and the map data structure, we have a list of cells. Cells are a base 23 representation of the row,column indices (In other words 9 represents row 0, column 9, while 23 represents row 1, column 0, and HQ has a cell value of (23*11)+11).)
 
<syntaxhighlight lang=J>Q HQ=: cells i.($map)#.11 11 NB. HQ as a graph index
\:~ ~. HQ{graph NB. all path lengths starting at HQ
_ 6 5 4 3 2 1